diff --git a/inc/states.h b/inc/states.h --- a/inc/states.h +++ b/inc/states.h @@ -8,9 +8,10 @@ typedef struct { float temp; uint8_t state_resume; uint8_t state; - float setpoint; + int32_t setpoint; uint8_t pid_enabled; uint8_t error_code; + uint8_t setpoint_index; } therm_status_t; typedef union @@ -22,14 +23,15 @@ typedef union uint32_t k_p; uint32_t k_i; uint32_t k_d; - int32_t temp_offset; + int32_t temp_offset; //TODO: convert to float uint32_t ignore_error; - int32_t setpoint_brew; - int32_t setpoint_steam; + int32_t setpoints[MAX_SETPOINTS]; uint32_t control_mode; uint32_t sensor_type; uint32_t plant_type; uint32_t hysteresis; + uint32_t setpoint_count; + uint32_t setpoint_aux_select_enable; } val; uint16_t data[128]; @@ -46,6 +48,8 @@ enum state { STATE_SETSENSORTYPE, STATE_SETMODE, STATE_SETPLANTTYPE, + STATE_SETSETPOINTCOUNT, + STATE_SETSETPOINTAUXSELECTENABLE, STATE_SETHYSTERESIS, STATE_SETP, STATE_SETI, @@ -73,6 +77,11 @@ enum plant_type { PLANT_COOLER, }; +enum aux_select { + AUX_DISABLE = 0, + AUX_ENABLE, +}; + enum GOTO_MODE { #ifdef BOOTLOADER_SHORTCUT MODE_BOOTLOADER,