![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
pachas
Dependencies: mbed QEI FastPWM
Diff: ventilator.cpp
- Revision:
- 1:aa5df1878126
- Parent:
- 0:9d0b9785d3d6
- Child:
- 2:6f618b905d4f
diff -r 9d0b9785d3d6 -r aa5df1878126 ventilator.cpp --- a/ventilator.cpp Sat Apr 11 22:53:05 2020 +0000 +++ b/ventilator.cpp Thu Apr 16 13:02:36 2020 +0000 @@ -12,17 +12,17 @@ /* Global variable definition */ -state_t system_state = SYSTEM_DEFAULT_STATE; +Main_Screen_State_t main_screen_state = MAIN_SCREEN_DEFAULT_STATE; uint8_t first_time_in_state = 1; /* Function definition */ void TFT_Encoder_Interaction(void){ - switch(system_state){ + switch(main_screen_state){ case Main_Screen_Cursor_Disable: if(Get_Button_Press(1 << ENTER_SW)){ rotary_encoder.reset(); - system_state = Main_Screen_Cursor_Enable; + main_screen_state = Main_Screen_Cursor_Enable; } break; @@ -39,7 +39,7 @@ } if(Get_Button_Press(1 << ENTER_SW)){ - system_state = (state_t)(2 + parameter_selection_index); + main_screen_state = (Main_Screen_State_t)(2 + parameter_selection_index); first_time_in_state = 1; } @@ -58,7 +58,7 @@ } if(Get_Button_Press(1 << ENTER_SW)){ - system_state = Main_Screen_Cursor_Disable; + main_screen_state = Main_Screen_Cursor_Disable; first_time_in_state = 1; Volume_Setpoint_Fix(); Parameter_Selection_Box_Remove(); @@ -78,7 +78,7 @@ } if(Get_Button_Press(1 << ENTER_SW)){ - system_state = Main_Screen_Cursor_Disable; + main_screen_state = Main_Screen_Cursor_Disable; first_time_in_state = 1; Resp_Frequency_Fix(); Parameter_Selection_Box_Remove(); @@ -99,7 +99,7 @@ } if(Get_Button_Press(1 << ENTER_SW)){ - system_state = Main_Screen_Cursor_Disable; + main_screen_state = Main_Screen_Cursor_Disable; first_time_in_state = 1; I_E_Ratio_Fix(); Parameter_Selection_Box_Remove();