Added GUI_DisplayRSSI.

This commit is contained in:
Dual Tachyon 2023-08-15 14:23:11 +01:00
parent 5899d3723a
commit ee5d518df6
2 changed files with 23 additions and 0 deletions

22
gui.c
View File

@ -625,3 +625,25 @@ void GUI_RenderRSSI(uint8_t RssiLevel, uint8_t VFO)
ST7565_DrawLine(0, Line, 23 , pLine, bIsClearMode);
}
void GUI_DisplayRSSI(uint16_t RSSI)
{
uint8_t Level;
if (RSSI >= gEEPROM_RSSI_CALIB[gInfoCHAN_A->Band][3]) {
Level = 6;
} else if (RSSI >= gEEPROM_RSSI_CALIB[gInfoCHAN_A->Band][2]) {
Level = 4;
} else if (RSSI >= gEEPROM_RSSI_CALIB[gInfoCHAN_A->Band][1]) {
Level = 2;
} else if (RSSI >= gEEPROM_RSSI_CALIB[gInfoCHAN_A->Band][0]) {
Level = 1;
} else {
Level = 0;
}
if (gVFO_RSSI_Level[gEeprom.RX_CHANNEL] != Level) {
gVFO_RSSI_Level[gEeprom.RX_CHANNEL] = Level;
GUI_RenderRSSI(Level, gEeprom.RX_CHANNEL);
}
}

1
gui.h
View File

@ -57,6 +57,7 @@ void GUI_DisplayScreen(void);
void GUI_SelectNextDisplay(GUI_DisplayType_t Display);
void GUI_RenderRSSI(uint8_t RssiLevel, uint8_t VFO);
void GUI_DisplayRSSI(uint16_t RSSI);
#endif