diff --git a/display.c b/display.c --- a/display.c +++ b/display.c @@ -23,18 +23,6 @@ uint8_t sw_right_last = 0; #define SW_LEFT_PRESSED (sw_left_last == 0 && sw_left == 1) #define SW_RIGHT_PRESSED (sw_right_last == 0 && sw_right == 1) -/////////////////////////////////////////////////////////////////////////////////////// -/// freaking multiple setpoint support /// -uint8_t step_duration[10] = {0,0,0,0,0,0,0,0,0,0}; -int16_t step_setpoint[10] = {0,0,0,0,0,0,0,0,0,0}; -uint8_t final_setpoint = 0; - -// Multiple screens to set setpoint and duration on each screen -// press center to go to the next one, and press left or right or something to confirm - -// When executing, complete on time AND(?) temperature. Maybe allow switching to OR via settings - -//////////////////////////////////////////////////////////////////////////////////////////////// uint8_t trigger_drawsetpoint = 1; @@ -223,45 +211,6 @@ void display_process(therm_settings_t* s } break; - case STATE_SETSTEPS: - { - // Write text to OLED - // [ step #1:: Duration: ### ] - // [ Setpoint: ### ] - char tempstr[6]; - - itoa(final_setpoint, tempstr, 10); - ssd1306_DrawString("Step #", 0, 0); - ssd1306_DrawString(tempstr, 0, 40); - - ssd1306_DrawString("Duration: ", 0, 5); - itoa(step_duration[final_setpoint], tempstr, 10); - ssd1306_DrawString(tempstr, 0, 70); - - ssd1306_DrawString("Setpoint: ", 0, 0); - itoa(step_setpoint[final_setpoint], tempstr, 10); - ssd1306_DrawString(tempstr, 0, 70); - - ssd1306_DrawString("Press to accept", 3, 40); - - // Button handler - TODO: increment max_step if pressed - // return and go to next state otherwise - if(SW_BTN_PRESSED) { - status->state = STATE_SETSTEPS; - final_setpoint++; - } - // else if(SW_LEFT_PRESSED) { - // state++; // go to next state or something - // } - else { - user_input(&set->k_p); - } - - // Event Handler - // N/A - - } break; - case STATE_SETWINDUP: { // Write text to OLED