File tree 2 files changed +12
-10
lines changed
2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -45,9 +45,9 @@ typedef struct{
45
45
double screen_rotation ;
46
46
double power_limit ;
47
47
double current_measurement ;
48
-
49
-
48
+ double startup_beep ;
50
49
}Flash_values ;
50
+
51
51
/* USER CODE END Includes */
52
52
53
53
/* Exported types ------------------------------------------------------------*/
Original file line number Diff line number Diff line change @@ -230,10 +230,11 @@ Flash_values default_flash_values = {.startup_temperature = 330,
230
230
.GPIO4_ON_at_run = 0 ,
231
231
.screen_rotation = 2 ,
232
232
.power_limit = 0 ,
233
- .current_measurement = 1 };
233
+ .current_measurement = 1 ,
234
+ .startup_beep = 1 };
234
235
235
236
/* List of names for settings menu */
236
- #define menu_length 15
237
+ #define menu_length 16
237
238
char menu_names [menu_length ][22 ] = { "Startup Temp " ,
238
239
"Temp Offset " ,
239
240
"Standby Temp " ,
@@ -246,6 +247,7 @@ char menu_names[menu_length][22] = { "Startup Temp ",
246
247
"Screen rotation " ,
247
248
"Limit Power " ,
248
249
"I measurement " ,
250
+ "Startup beep " ,
249
251
"-Load Default- " ,
250
252
"-Save and Reboot- " ,
251
253
"-Exit no Save- " };
@@ -458,7 +460,7 @@ void settings_menu(){
458
460
((double * )& flash_values )[menu_cursor_position ] = (float )old_value + (float )(TIM2 -> CNT - 1000.0 ) / 2.0 - (float )menu_cursor_position ;
459
461
}
460
462
461
- if ((menu_cursor_position == 5 ) || (menu_cursor_position == 8 ) || (menu_cursor_position == 11 )){
463
+ if ((menu_cursor_position == 5 ) || (menu_cursor_position == 8 ) || (menu_cursor_position == 11 ) || ( menu_cursor_position == 12 ) ){
462
464
((double * )& flash_values )[menu_cursor_position ] = fmod (round (fmod (fabs (((double * )& flash_values )[menu_cursor_position ]), 2 )), 2 );
463
465
}
464
466
else if (menu_cursor_position == 9 ){
@@ -1339,11 +1341,11 @@ int main(void)
1339
1341
LCD_draw_main_screen ();
1340
1342
1341
1343
/* Start-up beep */
1342
- #ifndef DEBUG
1343
- beep ();
1344
- HAL_Delay (100 );
1345
- beep ();
1346
- #endif
1344
+ if ( flash_values . startup_beep == 1 ){
1345
+ beep ();
1346
+ HAL_Delay (100 );
1347
+ beep ();
1348
+ }
1347
1349
1348
1350
1349
1351
while (1 ){
You can’t perform that action at this time.
0 commit comments