Changeset - 0747d846c71e
[Not reviewed]
cortex-f0
0 3 0
Ethan Zonca - 9 years ago 2015-06-05 19:51:12
ez@ethanzonca.com
Fix cal offset string being too long
3 files changed with 5 insertions and 2 deletions:
0 comments (0 inline, 0 general)
display.c
Show inline comments
 
@@ -358,13 +358,13 @@ void display_process(therm_settings_t* s
 

	
 
        case STATE_SETTEMPOFFSET:
 
        {
 
            // Write text to OLED
 
            // [ therm :: set temp offset ]
 
            // [ g = 12         ]
 
            ssd1306_DrawString("Thermocouple Offset", 0, 40);
 
            ssd1306_DrawString("Temp Cal Offset", 0, 40);
 
            ssd1306_drawlogo();
 

	
 
            char tempstr[6];
 
            itoa(set->temp_offset, tempstr, 10);
 
            ssd1306_DrawString("O=", 1, 45);
 
            ssd1306_DrawString("    ", 1, 57);
main.c
Show inline comments
 
@@ -232,13 +232,13 @@ int16_t update_pid(uint16_t k_p, uint16_
 
  // Proportional component
 
  int32_t p_term = k_p * error;
 
 
  // Error accumulator (integrator)
 
  i_state += error;
 
 
  // to prevent the iTerm getting huge despite lots of 
 
  // to prevent the iTerm getting huge from lots of 
 
  //  error, we use a "windup guard" 
 
  // (this happens when the machine is first turned on and
 
  // it cant help be cold despite its best efforts)
 
  // not necessary, but this makes windup guard values 
 
  // relative to the current iGain
 
  int32_t windup_guard_res = set.windup_guard / k_i;  
storage.c
Show inline comments
 
@@ -11,12 +11,13 @@ void save_settings(therm_settings_t *tos
 
    Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_WINDUP_GUARD, windup_guard);
 
    Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_K_P, k_p);
 
    Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_K_I, k_i);
 
    Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_K_D, k_d);
 
    Minimal_EEPROM_ProgramWord(EEPROM_BASE_ADDR + EEPROM_ADDR_UNITS, temp_units);
 
    Minimal_EEPROM_Lock();
 
    // TODO: Check for missing settings
 
*/
 
}
 

	
 
void save_setpoints(therm_settings_t *tosave)
 
{
 
    // TODO: Rework with FLASH read/write 
 
@@ -55,10 +56,12 @@ void restore_settings(therm_settings_t *
 

	
 
    while(Minimal_FLASH_GetStatus()==FLASH_BUSY);
 
    setpoint_steam = (*(__IO uint32_t*)(EEPROM_BASE_ADDR + EEPROM_ADDR_STEAMTEMP));    
 
    while(Minimal_FLASH_GetStatus()==FLASH_BUSY);
 
    temp_units = (*(__IO uint32_t*)(EEPROM_BASE_ADDR + EEPROM_ADDR_UNITS));    
 

	
 
    // TODO: Check for missing settings
 

	
 
    Minimal_EEPROM_Lock(); */
 
}
 

	
 

	
0 comments (0 inline, 0 general)