diff --git a/README.md b/README.md index d14c8d5..72d1c7e 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,13 @@ make To compile directly in windows without the need of a linux virtual machine: ``` -* Download and install "gcc-arm-none-eabi-10.3-2021.10-win32.exe" from https://developer.arm.com/downloads/-/gnu-rm -* Download and install "gnu_make-3.81.exe" from https://gnuwin32.sourceforge.net/packages/make.htm +1. Download and install "gcc-arm-none-eabi-10.3-2021.10-win32.exe" from https://developer.arm.com/downloads/-/gnu-rm +2. Download and install "gnu_make-3.81.exe" from https://gnuwin32.sourceforge.net/packages/make.htm +3. You may (or may not) need to reboot your PC after installing the above ``` -You may (or may not) need to reboot your PC after installing the above. - -Run 'win_make.bat' from the directory you saved this source code too, you may have to edit the bat file depending on where you installed 'gnu_make' too +Then you can run 'win_make.bat' from the directory you saved this source code too. +You may need to edit the bat file (path to make.exe) depending on where you installed 'gnu_make' too. # Credits diff --git a/app/app.c b/app/app.c index 3b26211..e5cc76b 100644 --- a/app/app.c +++ b/app/app.c @@ -1280,18 +1280,21 @@ void APP_TimeSlice500ms(void) { // Skipped authentic device check - if (gBacklightCountdown > 0) - if (--gBacklightCountdown == 0) - if (gEeprom.BACKLIGHT < 5) - GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off - - if (gKeypadLocked) + if (gCurrentFunction != FUNCTION_TRANSMIT) + { + if (gBacklightCountdown > 0) + if (--gBacklightCountdown == 0) + if (gEeprom.BACKLIGHT < 5) + GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn backlight off + } + + if (gKeypadLocked > 0) if (--gKeypadLocked == 0) gUpdateDisplay = true; // Skipped authentic device check - if (gFmRadioCountdown) + if (gFmRadioCountdown > 0) { gFmRadioCountdown--; return; @@ -1326,7 +1329,7 @@ void APP_TimeSlice500ms(void) gCurrentRSSI = BK4819_GetRSSI(); UI_UpdateRSSI(gCurrentRSSI); } - else +// else { if ((gFM_ScanState == FM_SCAN_OFF || gAskToSave) && gScanState == SCAN_OFF && gCssScanMode == CSS_SCAN_MODE_OFF) { @@ -1344,7 +1347,7 @@ void APP_TimeSlice500ms(void) gUpdateStatus = true; } - if (gVoltageMenuCountdown) + if (gVoltageMenuCountdown > 0) { if (--gVoltageMenuCountdown == 0) { diff --git a/app/menu.c b/app/menu.c index 0422e73..da9706b 100644 --- a/app/menu.c +++ b/app/menu.c @@ -1322,5 +1322,5 @@ void MENU_ProcessKeys(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld) } if (gScreenToDisplay == DISPLAY_MENU && gMenuCursor == MENU_VOL) - gVoltageMenuCountdown = 32; + gVoltageMenuCountdown = 2 * 30; // 30 sec } diff --git a/driver/backlight.c b/driver/backlight.c index 93b3495..2044a1e 100644 --- a/driver/backlight.c +++ b/driver/backlight.c @@ -19,6 +19,7 @@ #include "driver/gpio.h" #include "settings.h" +// this is decremented once every 500ms uint8_t gBacklightCountdown = 0; void BACKLIGHT_TurnOn(void) @@ -33,16 +34,16 @@ void BACKLIGHT_TurnOn(void) { default: case 1: // 10 sec - gBacklightCountdown = 2 * 10; // 1 + gBacklightCountdown = 2 * 10; break; case 2: // 20 sec - gBacklightCountdown = 2 * 20; // 21 + gBacklightCountdown = 2 * 20; break; case 3: // 40 sec - gBacklightCountdown = 2 * 40; // 61 + gBacklightCountdown = 2 * 40; break; case 4: // 80 sec - gBacklightCountdown = 2 * 80; // 141 + gBacklightCountdown = 2 * 80; break; case 5: // always on gBacklightCountdown = 0; diff --git a/firmware b/firmware index eb319db..0f7ebba 100644 Binary files a/firmware and b/firmware differ diff --git a/firmware.bin b/firmware.bin index 4c966d2..727ff15 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 76a835e..975a47d 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ