Changed backlight times

This commit is contained in:
OneOfEleven 2023-09-11 09:55:59 +01:00
parent 4ea9ff0294
commit be5300d138
6 changed files with 55 additions and 23 deletions

View File

@ -11,16 +11,16 @@ Am amazing achievement if you ask me !
This version you can customize at compile time by making various changes to the makefile. This version you can customize at compile time by making various changes to the makefile.
You can edit those changes by (currently) editing the MakeFile, look for these lines .. You can edit those changes by (currently) editing the MakeFile, look for these lines ..
* CFLAGS += -DDISABLE_BIG_FREQ .. show frequencies using smaller font * CFLAGS += -DDISABLE_BIG_FREQ .. show frequencies using smaller font
* CFLAGS += -DDISABLE_NOAA .. remove NOAA channels option from the firmware * CFLAGS += -DDISABLE_NOAA .. remove NOAA channels option from the firmware
* CFLAGS += -DDISABLE_VOICE .. remove spoken VOICES option from the firmware * CFLAGS += -DDISABLE_VOICE .. remove spoken VOICES option from the firmware
* CFLAGS += -DDISABLE_AIRCOPY .. remove AIRCOPY option * CFLAGS += -DDISABLE_AIRCOPY .. remove AIRCOPY option
* CFLAGS += -DDISABLE_ALARM .. remove the ALARM transmit option from the firmware * CFLAGS += -DDISABLE_ALARM .. remove the ALARM transmit option from the firmware
* CFLAGS += -DKEEP_MEM_NAME .. keep the memory channels name when re-saving a channel * CFLAGS += -DKEEP_MEM_NAME .. keep the memory channels name when re-saving a channel
* CFLAGS += -DCHAN_NAME_FREQ .. show the channel frequency (as well as channel number/name) * CFLAGS += -DCHAN_NAME_FREQ .. show the channel frequency (as well as channel number/name)
* #CFLAGS += -DENABLE_TX_WHEN_AM .. enable TX when radio set to AM (radio does NOT do AM, the adverts are false) * #CFLAGS += -DENABLE_TX_WHEN_AM .. enable TX when radio set to AM (radio does NOT do AM, the adverts are false)
* #CFLAGS += -DSINGLE_VFO_CHAN .. (not yet implemented) show a single VFO/CHANNEL if dual-watch/cross-band are disabled * #CFLAGS += -DSINGLE_VFO_CHAN .. (not yet implemented) show a single VFO/CHANNEL if dual-watch/cross-band are disabled
* #CFLAGS += -DBAND_SCOPE .. (not yet implemented) show a band scope (spectrum/panadapter) * #CFLAGS += -DBAND_SCOPE .. (not yet implemented) add a band scope/spectrum/panadapter option
To enable the custom option just uncomment the line by removing the starting '#'. To enable the custom option just uncomment the line by removing the starting '#'.
@ -28,7 +28,7 @@ To enable the custom option just uncomment the line by removing the starting '#'
* Various bugs fixed that the QS firmware had (TX tail, Menu confimation etc) * Various bugs fixed that the QS firmware had (TX tail, Menu confimation etc)
* Added new bugs * Added new bugs
* Battery voltage boot screen now includes the percentage (as well as voltage) * Battery voltage boot screen now includes percentage
* Slightly less intense menu style * Slightly less intense menu style
* AM RX now allowed everywhere, although the radio really doesn't do AM, the adverts are a con ! * AM RX now allowed everywhere, although the radio really doesn't do AM, the adverts are a con !
* Finer RSSI bar steps * Finer RSSI bar steps
@ -38,14 +38,14 @@ To enable the custom option just uncomment the line by removing the starting '#'
* "STEP" menu, added 1.25kHz option, removed 5kHz option * "STEP" menu, added 1.25kHz option, removed 5kHz option
* "TXP" menu, renamed to "TX-PWR" * "TXP" menu, renamed to "TX-PWR"
* "SAVE" menu, renamed to "B-SAVE" * "SAVE" menu, renamed to "B-SAVE"
* "WX" menu, renamed to "CROS-B" - 'WX' normally means weather here in the UK * "WX" menu, renamed to "CROS-B" ('WX' means weather here in the UK)
* "ABR" menu, renamed to "BAK-LT", shows extended backlight times, includes always ON option * "ABR" menu, renamed to "BAK-LT", extended times, includes always ON option
* "SCR" menu, renamed to "SCRAM" * "SCR" menu, renamed to "SCRAM"
* "MIC" menu, shows mic gain in dB's, includes max mic gain possible (+15.5dB) * "MIC" menu, shows mic gain in dB's, includes max mic gain possible (+15.5dB)
* "VOL" menu, renamed to "BATVOL", shows voltage and percentage * "VOL" menu, renamed to "BATVOL", added percentage level
* "AM" menu, renamed to "MODE", shows RX modulation mode * "AM" menu, renamed to "MODE", shows RX modulation mode
Menu renames are to try and reduce 'WTF does that do/mean ?' Menu renames are to try and reduce 'WTF does that mean ?'
# Compiler # Compiler

View File

@ -26,7 +26,26 @@ void BACKLIGHT_TurnOn(void)
if (gEeprom.BACKLIGHT > 0) if (gEeprom.BACKLIGHT > 0)
{ {
GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight ON GPIO_SetBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight ON
gBacklightCountdown = (gEeprom.BACKLIGHT < 5) ? (gEeprom.BACKLIGHT * 20) - 19 : 0; // much longer backlight times switch (gEeprom.BACKLIGHT)
{
case 1: // 10 sec
gBacklightCountdown = 1;
break;
case 2: // 20 sec
gBacklightCountdown = 21;
break;
case 3: // 40 sec
gBacklightCountdown = 61;
break;
case 4: // 80 sec
gBacklightCountdown = 141;
break;
case 5: // always on
default:
gBacklightCountdown = 0;
break;
}
// gBacklightCountdown = (gEeprom.BACKLIGHT < 5) ? (gEeprom.BACKLIGHT * 20) - 19 : 0;
} }
} }

BIN
firmware

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -379,13 +379,26 @@ void UI_DisplayMenu(void)
break; break;
case MENU_ABR: case MENU_ABR:
if (gSubMenuSelection == 0) #if 0
strcpy(String, "OFF"); if (gSubMenuSelection == 0)
else strcpy(String, "OFF");
if (gSubMenuSelection < 5) else
sprintf(String, "%d sec", gSubMenuSelection * 10); if (gSubMenuSelection < 5)
else sprintf(String, "%d sec", gSubMenuSelection * 10);
strcpy(String, "ON"); else
strcpy(String, "ON");
#else
switch (gSubMenuSelection)
{
case 0: strcpy(String, "OFF"); break;
case 1: strcpy(String, "10 sec"); break;
case 2: strcpy(String, "20 sec"); break;
case 3: strcpy(String, "40 sec"); break;
case 4: strcpy(String, "80 sec"); break;
case 5: strcpy(String, "ON"); break;
default: strcpy(String, "???"); break;
}
#endif
break; break;
case MENU_AM: case MENU_AM: