diff --git a/code/LCDScreen.cpp b/code/LCDScreen.cpp index df04b9d..fe197c7 100644 --- a/code/LCDScreen.cpp +++ b/code/LCDScreen.cpp @@ -65,10 +65,16 @@ class LCDScreen { } LCDScreenState get_next_state(){ + if (this->current_state == 2){ + return this->ordered_states[0]; + } return this->ordered_states[this->current_state + 1]; } LCDScreenState get_previous_state(){ + if (this->current_state == 0){ + return this->ordered_states[2]; + } return this->ordered_states[this->current_state - 1]; }