Skip to content

Commit c74be5c

Browse files
committed
add wait for button release at beginning fo Settings screen
1 parent 676cdbf commit c74be5c

File tree

1 file changed

+3
-0
lines changed
  • AxxSolder_firmware/Core/Src

1 file changed

+3
-0
lines changed

AxxSolder_firmware/Core/Src/main.c

+3
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,7 @@ void left_align_double(char* str, double number, int8_t len)
589589
void settings_menu(){
590590
/* If SW_1 is pressed during startup - Show SETTINGS and allow to release button. */
591591
if (HAL_GPIO_ReadPin (GPIOB, SW_1_Pin) == 1){
592+
592593
char str[32];
593594
memset(&str, '\0', strlen(str));
594595
if((flash_values.screen_rotation == 0) || (flash_values.screen_rotation == 2)){
@@ -613,6 +614,8 @@ void settings_menu(){
613614
LCD_DrawLine(0,41,240,41,RGB_to_BRG(C_YELLOW));
614615
LCD_DrawLine(0,42,240,42,RGB_to_BRG(C_YELLOW));
615616

617+
while(HAL_GPIO_ReadPin (GPIOB, SW_1_Pin) == 1){} // Wait until user releases button
618+
616619
HAL_Delay(500);
617620
while(menu_active == 1){
618621
if(menu_level == 0){

0 commit comments

Comments
 (0)