Changeset - 1293e4735543
[Not reviewed]
default
0 1 0
Ethan Zonca - 10 years ago 2014-10-18 15:50:44
ez@ethanzonca.com
Fix bug where new device can't change modes down
1 file changed with 2 insertions and 2 deletions:
main.c
2
2
0 comments (0 inline, 0 general)
main.c
Show inline comments
 
@@ -289,13 +289,13 @@ void draw_setpoint() {
 
    ssd1306_DrawString("-> ", 3, 80);
 
    itoa(setpoint, tempstr);
 
    ssd1306_DrawString("    ", 3, 95);
 
    ssd1306_DrawString(tempstr, 3, 95);
 
}
 
 
uint8_t goto_mode = 2;
 
uint8_t goto_mode = 1;
 
 
// State machine
 
uint8_t sw_btn_last = 0;
 
uint8_t sw_up_last = 0;
 
uint8_t sw_down_last = 0;
 
uint8_t sw_left_last = 0;
 
@@ -425,13 +425,13 @@ void machine()
 
                        state = STATE_PREHEAT_BREW;
 
                }
 
            }
 
            else if(SW_UP_PRESSED && goto_mode < 2) {
 
                goto_mode++;
 
            }
 
            else if(SW_DOWN_PRESSED && k_p > 0 && goto_mode > 0) {
 
            else if(SW_DOWN_PRESSED && goto_mode > 0) {
 
                goto_mode--;
 
            }
 
 
 
            // Event Handler
 
            // N/A
0 comments (0 inline, 0 general)