|
34 | 34 |
|
35 | 35 | /* Private typedef -----------------------------------------------------------*/
|
36 | 36 | /* USER CODE BEGIN PTD */
|
37 |
| -#define version "3.1.0" |
| 37 | +uint8_t fw_version_major = 3; |
| 38 | +uint8_t fw_version_minor = 1; |
| 39 | +uint8_t fw_version_patch = 0; |
38 | 40 |
|
39 | 41 | #define BTN_LONG_PRESS 15 //*50ms (htim16 interval) --> 15 = 750ms
|
40 | 42 |
|
@@ -427,12 +429,14 @@ void settings_menu(){
|
427 | 429 | /* If SW_1 is pressed during startup - Show SETTINGS and allow to release button. */
|
428 | 430 | if (HAL_GPIO_ReadPin (GPIOB, SW_1_Pin) == 1){
|
429 | 431 | if((flash_values.screen_rotation == 0) || (flash_values.screen_rotation == 2)){
|
430 |
| - LCD_PutStr(6, 300, "Version:", FONT_arial_20X23, RGB_to_BRG(C_RED), RGB_to_BRG(C_BLACK)); |
431 |
| - LCD_PutStr(150, 300, version, FONT_arial_20X23, RGB_to_BRG(C_RED), RGB_to_BRG(C_BLACK)); |
| 432 | + char str[8]; |
| 433 | + sprintf(str, "fw: %d.%d.%d hw: %d", fw_version_major,fw_version_minor, fw_version_patch, get_hw_version()); |
| 434 | + LCD_PutStr(6, 300, str, FONT_arial_20X23, RGB_to_BRG(C_ORANGE), RGB_to_BRG(C_BLACK)); |
432 | 435 | }
|
433 | 436 | else{
|
434 |
| - LCD_PutStr(0, 215, "Version:", FONT_arial_20X23, RGB_to_BRG(C_RED), RGB_to_BRG(C_BLACK)); |
435 |
| - LCD_PutStr(150, 215, version, FONT_arial_20X23, RGB_to_BRG(C_RED), RGB_to_BRG(C_BLACK)); |
| 437 | + char str[8]; |
| 438 | + sprintf(str, "fw: %d.%d.%d hw: %d", fw_version_major,fw_version_minor, fw_version_patch, get_hw_version()); |
| 439 | + LCD_PutStr(6, 215, str, FONT_arial_20X23, RGB_to_BRG(C_ORANGE), RGB_to_BRG(C_BLACK)); |
436 | 440 | }
|
437 | 441 |
|
438 | 442 | TIM2->CNT = 1000;
|
|
0 commit comments