Skip to content

Commit

Permalink
add wait for button release at beginning fo Settings screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AxxAxx committed Nov 20, 2024
1 parent 676cdbf commit c74be5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AxxSolder_firmware/Core/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ void left_align_double(char* str, double number, int8_t len)
void settings_menu(){
/* If SW_1 is pressed during startup - Show SETTINGS and allow to release button. */
if (HAL_GPIO_ReadPin (GPIOB, SW_1_Pin) == 1){

char str[32];
memset(&str, '\0', strlen(str));
if((flash_values.screen_rotation == 0) || (flash_values.screen_rotation == 2)){
Expand All @@ -613,6 +614,8 @@ void settings_menu(){
LCD_DrawLine(0,41,240,41,RGB_to_BRG(C_YELLOW));
LCD_DrawLine(0,42,240,42,RGB_to_BRG(C_YELLOW));

while(HAL_GPIO_ReadPin (GPIOB, SW_1_Pin) == 1){} // Wait until user releases button

HAL_Delay(500);
while(menu_active == 1){
if(menu_level == 0){
Expand Down

0 comments on commit c74be5c

Please sign in to comment.