mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-29 06:41:25 +03:00
Fixed big freq '00' bug and backlight off exit key bug.
This commit is contained in:
parent
b9bd049dc9
commit
dee38f429f
@ -1934,7 +1934,7 @@ void APP_TimeSlice500ms(void)
|
|||||||
ST7565_Configure_GPIO_B11();
|
ST7565_Configure_GPIO_B11();
|
||||||
|
|
||||||
//if (gEeprom.BACKLIGHT < 5)
|
//if (gEeprom.BACKLIGHT < 5)
|
||||||
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
GPIO_ClearBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT); // turn the backlight off
|
||||||
}
|
}
|
||||||
#ifdef ENABLE_VOICE
|
#ifdef ENABLE_VOICE
|
||||||
else
|
else
|
||||||
@ -2067,7 +2067,7 @@ static void APP_ProcessKey(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
// const bool backlight_was_on = (gBacklightCountdown > 0 || gEeprom.BACKLIGHT >= 5);
|
// const bool backlight_was_on = (gBacklightCountdown > 0 || gEeprom.BACKLIGHT >= 5);
|
||||||
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
const bool backlight_was_on = GPIO_CheckBit(&GPIOB->DATA, GPIOB_PIN_BACKLIGHT);
|
||||||
|
|
||||||
if (Key == KEY_EXIT && !backlight_was_on)
|
if (Key == KEY_EXIT && !backlight_was_on && gEeprom.BACKLIGHT > 0)
|
||||||
{ // just turn the light on for now
|
{ // just turn the light on for now
|
||||||
BACKLIGHT_TurnOn();
|
BACKLIGHT_TurnOn();
|
||||||
gBeepToPlay = BEEP_NONE;
|
gBeepToPlay = BEEP_NONE;
|
||||||
|
10
app/menu.c
10
app/menu.c
@ -908,6 +908,14 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
|
if (gEeprom.BACKLIGHT == 0)
|
||||||
|
{ // turn the light on so the user can see the screen
|
||||||
|
const uint8_t value = gEeprom.BACKLIGHT;
|
||||||
|
gEeprom.BACKLIGHT = 1;
|
||||||
|
BACKLIGHT_TurnOn();
|
||||||
|
gEeprom.BACKLIGHT = value; // restore the setting
|
||||||
|
}
|
||||||
|
|
||||||
gSubMenuSelection = gEeprom.BACKLIGHT;
|
gSubMenuSelection = gEeprom.BACKLIGHT;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1154,7 +1162,7 @@ static void MENU_Key_DIGITS(KEY_Code_t Key, bool bKeyPressed, bool bKeyHeld)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
NUMBER_Get(gInputBox, &Frequency);
|
NUMBER_Get(gInputBox, &Frequency);
|
||||||
gSubMenuSelection = FREQUENCY_FloorToStep(Frequency + 62, gTxVfo->StepFrequency, 0);
|
gSubMenuSelection = FREQUENCY_FloorToStep(Frequency + 75, gTxVfo->StepFrequency, 0);
|
||||||
|
|
||||||
gInputBoxIndex = 0;
|
gInputBoxIndex = 0;
|
||||||
return;
|
return;
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
@ -264,7 +264,7 @@ void UI_DisplayMain(void)
|
|||||||
// show the main large frequency digits
|
// show the main large frequency digits
|
||||||
UI_DisplayFrequency(String, 32, Line, false, false);
|
UI_DisplayFrequency(String, 32, Line, false, false);
|
||||||
// show the remaining 2 small frequency digits
|
// show the remaining 2 small frequency digits
|
||||||
UI_DisplaySmallDigits(2, String + 7, 113, Line + 1, true);
|
UI_DisplaySmallDigits(2, String + 6, 113, Line + 1, true);
|
||||||
#else
|
#else
|
||||||
// show the frequency in the main font
|
// show the frequency in the main font
|
||||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
@ -305,7 +305,7 @@ void UI_DisplayMain(void)
|
|||||||
// show the main large frequency digits
|
// show the main large frequency digits
|
||||||
UI_DisplayFrequency(String, 32, Line, false, false);
|
UI_DisplayFrequency(String, 32, Line, false, false);
|
||||||
// show the remaining 2 small frequency digits
|
// show the remaining 2 small frequency digits
|
||||||
UI_DisplaySmallDigits(2, String + 7, 113, Line + 1, true);
|
UI_DisplaySmallDigits(2, String + 6, 113, Line + 1, true);
|
||||||
#else
|
#else
|
||||||
// show the frequency in the main font
|
// show the frequency in the main font
|
||||||
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(String, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "bitmaps.h"
|
#include "bitmaps.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "dcs.h"
|
#include "dcs.h"
|
||||||
|
#include "driver/backlight.h"
|
||||||
#include "driver/bk4819.h"
|
#include "driver/bk4819.h"
|
||||||
#include "driver/eeprom.h" // EEPROM_ReadBuffer()
|
#include "driver/eeprom.h" // EEPROM_ReadBuffer()
|
||||||
#include "driver/st7565.h"
|
#include "driver/st7565.h"
|
||||||
@ -393,6 +394,14 @@ void UI_DisplayMenu(void)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_ABR:
|
case MENU_ABR:
|
||||||
|
if (gEeprom.BACKLIGHT == 0)
|
||||||
|
{ // turn the light on so the user can see the screen
|
||||||
|
const uint8_t value = gEeprom.BACKLIGHT;
|
||||||
|
gEeprom.BACKLIGHT = 1;
|
||||||
|
BACKLIGHT_TurnOn();
|
||||||
|
gEeprom.BACKLIGHT = value; // restore the setting
|
||||||
|
}
|
||||||
|
|
||||||
strcpy(String, gSubMenu_BACK_LIGHT[gSubMenuSelection]);
|
strcpy(String, gSubMenu_BACK_LIGHT[gSubMenuSelection]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user