mirror of
https://github.com/armel/uv-k1-k5v3-firmware-custom.git
synced 2026-10-02 03:15:37 +00:00
Fix ALL and priority
This commit is contained in:
1 parent
a4b8a236b0
commit
3775232757
2 files changed
+29
-35
No files matched your search
@@ -250,9 +250,9 @@ static void NextFreqChannel(void)
|
||||
static void NextMemChannel(void)
|
||||
{
|
||||
static uint16_t prev_mr_chan = 0;
|
||||
const bool enabled = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < MR_CHANNELS_LIST + 1) ? gEeprom.SCAN_LIST_ENABLED[0] : true;
|
||||
const int16_t chan1 = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < MR_CHANNELS_LIST + 1 && gEeprom.SCANLIST_PRIORITY_CH[0] != MR_CHANNELS_MAX) ? gEeprom.SCANLIST_PRIORITY_CH[0] : -1;
|
||||
const int16_t chan2 = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT < MR_CHANNELS_LIST + 1 && gEeprom.SCANLIST_PRIORITY_CH[1] != MR_CHANNELS_MAX) ? gEeprom.SCANLIST_PRIORITY_CH[1] : -1;
|
||||
const bool enabled = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT <= MR_CHANNELS_LIST + 1) ? gEeprom.SCAN_LIST_ENABLED[0] : true;
|
||||
const int16_t chan1 = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT <= MR_CHANNELS_LIST + 1 && gEeprom.SCANLIST_PRIORITY_CH[0] != MR_CHANNELS_MAX) ? gEeprom.SCANLIST_PRIORITY_CH[0] : -1;
|
||||
const int16_t chan2 = (gEeprom.SCAN_LIST_DEFAULT > 0 && gEeprom.SCAN_LIST_DEFAULT <= MR_CHANNELS_LIST + 1 && gEeprom.SCANLIST_PRIORITY_CH[1] != MR_CHANNELS_MAX) ? gEeprom.SCANLIST_PRIORITY_CH[1] : -1;
|
||||
const uint16_t prev_chan = gNextMrChannel;
|
||||
uint16_t chan = 0;
|
||||
|
||||
|
||||
+26
-32
@@ -95,43 +95,37 @@ void UI_DisplayStatus()
|
||||
if (gScanStateDir != SCAN_OFF || SCANNER_IsScanning()) {
|
||||
if (IS_MR_CHANNEL(gNextMrChannel) && !SCANNER_IsScanning()) { // channel mode
|
||||
|
||||
if(gEeprom.SCAN_LIST_DEFAULT == MR_CHANNELS_LIST + 1)
|
||||
{
|
||||
sprintf(str, "%s", "ALL");
|
||||
GUI_DisplaySmallest(str, 2, 1, true, true);
|
||||
for (uint8_t x = 0; x < 15; x++)
|
||||
{
|
||||
gStatusLine[x] ^= 0x7F;
|
||||
}
|
||||
uint8_t end = 0;
|
||||
|
||||
if(gEeprom.SCAN_LIST_DEFAULT == MR_CHANNELS_LIST + 1)
|
||||
{
|
||||
if(gEeprom.SCAN_LIST_ENABLED[0]==1) {
|
||||
sprintf(str, "%s+", "ALL");
|
||||
end = 19;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint8_t end = 0;
|
||||
if(gEeprom.SCAN_LIST_ENABLED[0]==1) {
|
||||
sprintf(str, "%02d+", gEeprom.SCAN_LIST_DEFAULT);
|
||||
end = 15;
|
||||
}
|
||||
else {
|
||||
sprintf(str, "%02d", gEeprom.SCAN_LIST_DEFAULT);
|
||||
end = 11;
|
||||
}
|
||||
GUI_DisplaySmallest(str, 2, 1, true, true);
|
||||
for (uint8_t x = 0; x < end; x++)
|
||||
{
|
||||
gStatusLine[x] ^= 0x7F;
|
||||
}
|
||||
sprintf(str, "%s", "ALL");
|
||||
end = 15;
|
||||
}
|
||||
|
||||
/*
|
||||
switch(gEeprom.SCAN_LIST_DEFAULT) {
|
||||
case MR_CHANNELS_LIST + 1:
|
||||
memcpy(line + 0, BITMAP_ScanListAll, sizeof(BITMAP_ScanListAll));
|
||||
break;
|
||||
default:
|
||||
sprintf(str, "%02d", gEeprom.SCAN_LIST_DEFAULT);
|
||||
UI_PrintStringSmallBufferNormal(str, line + 0);
|
||||
}
|
||||
*/
|
||||
else
|
||||
{
|
||||
if(gEeprom.SCAN_LIST_ENABLED[0]==1) {
|
||||
sprintf(str, "%02d+", gEeprom.SCAN_LIST_DEFAULT);
|
||||
end = 15;
|
||||
}
|
||||
else {
|
||||
sprintf(str, "%02d", gEeprom.SCAN_LIST_DEFAULT);
|
||||
end = 11;
|
||||
}
|
||||
}
|
||||
|
||||
GUI_DisplaySmallest(str, 2, 1, true, true);
|
||||
for (uint8_t x = 0; x < end; x++)
|
||||
{
|
||||
gStatusLine[x] ^= 0x7F;
|
||||
}
|
||||
}
|
||||
else { // frequency mode
|
||||
memcpy(line + x + 1, gFontS, sizeof(gFontS));
|
||||
|
||||
Reference in new issue
Block a user