Add Last QRG
This commit is contained in:
@@ -58,6 +58,17 @@ void BACKLIGHT_InitHardware()
|
||||
0;
|
||||
}
|
||||
|
||||
static void BACKLIGHT_Sound(void)
|
||||
{
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
gK5startup = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BACKLIGHT_TurnOn(void)
|
||||
{
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
@@ -65,17 +76,13 @@ void BACKLIGHT_TurnOn(void)
|
||||
#endif
|
||||
|
||||
if (gEeprom.BACKLIGHT_TIME == 0) {
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gK5startup == true) {
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
}
|
||||
}
|
||||
gK5startup = false;
|
||||
#endif
|
||||
BACKLIGHT_TurnOff();
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
if(gK5startup == true)
|
||||
{
|
||||
BACKLIGHT_Sound();
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -89,13 +96,7 @@ void BACKLIGHT_TurnOn(void)
|
||||
SYSTEM_DelayMs(50);
|
||||
}
|
||||
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_ALL)
|
||||
{
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
AUDIO_PlayBeep(BEEP_880HZ_60MS_TRIPLE_BEEP);
|
||||
}
|
||||
|
||||
gK5startup = false;
|
||||
BACKLIGHT_Sound();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -199,6 +199,7 @@ static void sort(int16_t *a, int16_t *b)
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
/*
|
||||
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black)
|
||||
{
|
||||
if(x2==x1) {
|
||||
@@ -218,6 +219,7 @@ static void sort(int16_t *a, int16_t *b)
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void PutPixel(uint8_t x, uint8_t y, bool fill) {
|
||||
UI_DrawPixelBuffer(gFrameBuffer, x, y, fill);
|
||||
|
@@ -33,7 +33,7 @@ void UI_DisplayPopup(const char *string);
|
||||
|
||||
void UI_DrawPixelBuffer(uint8_t (*buffer)[128], uint8_t x, uint8_t y, bool black);
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black);
|
||||
//void UI_DrawLineDottedBuffer(uint8_t (*buffer)[128], int16_t x1, int16_t y1, int16_t x2, int16_t y2, bool black);
|
||||
void PutPixel(uint8_t x, uint8_t y, bool fill);
|
||||
void PutPixelStatus(uint8_t x, uint8_t y, bool fill);
|
||||
void GUI_DisplaySmallest(const char *pString, uint8_t x, uint8_t y, bool statusbar, bool fill);
|
||||
|
55
ui/main.c
55
ui/main.c
@@ -45,10 +45,12 @@
|
||||
center_line_t center_line = CENTER_LINE_NONE;
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
static bool RxBlink;
|
||||
static int8_t RxBlink;
|
||||
static int8_t RxBlinkLed = 0;
|
||||
static int8_t RxBlinkLedCounter;
|
||||
static int8_t RxLine;
|
||||
static uint32_t RxOnVfofrequency;
|
||||
|
||||
bool isMainOnlyInputDTMF = false;
|
||||
|
||||
static bool isMainOnly(bool checkGui)
|
||||
@@ -264,6 +266,7 @@ void DisplayRSSIBar(const bool now)
|
||||
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
/*
|
||||
const char empty[] = {
|
||||
0b00000000,
|
||||
0b00000000,
|
||||
@@ -273,6 +276,7 @@ void DisplayRSSIBar(const bool now)
|
||||
0b00000000,
|
||||
0b00000000,
|
||||
};
|
||||
*/
|
||||
|
||||
unsigned int line;
|
||||
if (isMainOnly(false))
|
||||
@@ -284,28 +288,29 @@ void DisplayRSSIBar(const bool now)
|
||||
line = 3;
|
||||
}
|
||||
|
||||
char rx[4];
|
||||
//char rx[4];
|
||||
//sprintf(String, "%d", RxBlink);
|
||||
//UI_PrintStringSmallBold(String, 80, 0, RxLine);
|
||||
|
||||
if(RxLine >= 0 && center_line != CENTER_LINE_IN_USE)
|
||||
{
|
||||
if(RxBlink == true)
|
||||
switch(RxBlink)
|
||||
{
|
||||
sprintf(rx, "%s", "RX");
|
||||
//UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||
RxBlink = false;
|
||||
case 0:
|
||||
UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||
break;
|
||||
case 1:
|
||||
UI_PrintStringSmallBold("RX", 14, 0, RxLine);
|
||||
RxBlink = 2;
|
||||
break;
|
||||
case 2:
|
||||
for (uint8_t i = 14; i < 30; i++)
|
||||
{
|
||||
gFrameBuffer[RxLine][i] = 0x00;
|
||||
}
|
||||
RxBlink = 1;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(rx, "%s", " ");
|
||||
memcpy(gFrameBuffer[RxLine] + 14, &empty, ARRAY_SIZE(empty));
|
||||
memcpy(gFrameBuffer[RxLine] + 21, &empty, ARRAY_SIZE(empty));
|
||||
|
||||
//UI_PrintStringSmallBold(" ", 14, 0, RxLine);
|
||||
RxBlink = true;
|
||||
}
|
||||
UI_PrintStringSmallBold(rx, 14, 0, RxLine);
|
||||
ST7565_BlitLine(RxLine);
|
||||
}
|
||||
#else
|
||||
@@ -753,6 +758,8 @@ void UI_DisplayMain(void)
|
||||
memcpy(p_line0 + 0, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
}
|
||||
|
||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{ // transmitting
|
||||
|
||||
@@ -776,14 +783,15 @@ void UI_DisplayMain(void)
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
RxBlinkLed = 1;
|
||||
RxBlinkLedCounter = 0;
|
||||
RxLine = line;
|
||||
RxOnVfofrequency = frequency;
|
||||
if(!isMainVFO)
|
||||
{
|
||||
RxLine = line;
|
||||
RxBlink = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
RxLine = -1;
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
RxBlink = 0;
|
||||
}
|
||||
#else
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
@@ -792,6 +800,12 @@ void UI_DisplayMain(void)
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
else
|
||||
{
|
||||
if(RxOnVfofrequency == frequency && !isMainOnly(false))
|
||||
{
|
||||
UI_PrintStringSmallNormal(">>", 14, 0, line);
|
||||
//memcpy(p_line0 + 14, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
}
|
||||
|
||||
if(RxBlinkLed == 1)
|
||||
RxBlinkLed = 2;
|
||||
}
|
||||
@@ -841,9 +855,6 @@ void UI_DisplayMain(void)
|
||||
state = VFO_STATE_ALARM;
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t frequency = gEeprom.VfoInfo[vfo_num].pRX->Frequency;
|
||||
|
||||
if (state != VFO_STATE_NORMAL)
|
||||
{
|
||||
if (state < ARRAY_SIZE(VfoStateStr))
|
||||
|
@@ -469,7 +469,12 @@ void UI_DisplayMenu(void)
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
UI_DrawLineBuffer(gFrameBuffer, 50, 0, 50, 55, 1); // Be ware, status zone = 8 lines, the rest = 56 ->total 64
|
||||
UI_DrawLineDottedBuffer(gFrameBuffer, 0, 46, 50, 46, 1);
|
||||
//UI_DrawLineDottedBuffer(gFrameBuffer, 0, 46, 50, 46, 1);
|
||||
|
||||
for (uint8_t i = 0; i < 50; i += 2)
|
||||
{
|
||||
gFrameBuffer[5][i] = 0x40;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef ENABLE_CUSTOM_MENU_LAYOUT
|
||||
|
11
ui/welcome.c
11
ui/welcome.c
@@ -55,8 +55,8 @@ void UI_DisplayWelcome(void)
|
||||
UI_DisplayClear();
|
||||
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
ST7565_BlitStatusLine(); // blank status line
|
||||
ST7565_BlitFullScreen();
|
||||
//ST7565_BlitStatusLine(); // blank status line
|
||||
//ST7565_BlitFullScreen();
|
||||
|
||||
if (gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_NONE || gEeprom.POWER_ON_DISPLAY_MODE == POWER_ON_DISPLAY_MODE_SOUND) {
|
||||
ST7565_FillScreen(0x00);
|
||||
@@ -105,13 +105,16 @@ void UI_DisplayWelcome(void)
|
||||
#ifdef ENABLE_FEAT_F4HWN
|
||||
UI_PrintStringSmallNormal(Version, 0, 128, 4);
|
||||
|
||||
for (uint8_t i = 0; i < 128; i++)
|
||||
{
|
||||
gFrameBuffer[3][i] ^= 0x80;
|
||||
}
|
||||
|
||||
for (uint8_t i = 18; i < 110; i++)
|
||||
{
|
||||
gFrameBuffer[4][i] ^= 0xFF;
|
||||
}
|
||||
|
||||
UI_DrawLineBuffer(gFrameBuffer, 0, 31, 126, 31, 1);
|
||||
|
||||
UI_PrintStringSmallNormal(Based, 0, 127, 5);
|
||||
UI_PrintStringSmallNormal(Credits, 0, 127, 6);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user