Skip to content

Commit 97de6b1

Browse files
committed
Merge branch 'feature/channel-name-display'
2 parents e5d4b37 + 244c351 commit 97de6b1

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

board.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ void BOARD_EEPROM_Init(void)
526526

527527
// 0E78..0E7F
528528
EEPROM_ReadBuffer(0x0E78, Data, 8);
529-
gEeprom.CHANNEL_DISPLAY_MODE = (Data[1] < 3) ? Data[1] : MDF_FREQUENCY;
529+
gEeprom.CHANNEL_DISPLAY_MODE = MDF_NAME;
530530
gEeprom.CROSS_BAND_RX_TX = (Data[2] < 3) ? Data[2] : CROSS_BAND_OFF;
531531
gEeprom.BATTERY_SAVE = (Data[3] < 5) ? Data[3] : 4;
532532
gEeprom.DUAL_WATCH = (Data[4] < 3) ? Data[4] : DUAL_WATCH_CHAN_A;

docs/releases/LNR24A4.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Loaner Firmware Alpha 4 – LNR24A4
2+
3+
- Force MR channels to render names (or the `CH-###` fallback) on the main screen so end users no longer see raw transmit frequencies.
4+
- Default new boots to name display mode (`MDF_NAME`) regardless of prior EEPROM values, keeping radios aligned with the locked channel-only experience.
5+
6+
Artifacts generated via `./compile-with-docker.sh`:
7+
8+
- `compiled-firmware/loaner-firmware-LNR24A4.bin`
9+
- `compiled-firmware/loaner-firmware-LNR24A4.packed.bin`

ui/main.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ void UI_DisplayMain(void)
236236
if (gInputBoxIndex && IS_FREQ_CHANNEL(gEeprom.ScreenChannel[i]) && gEeprom.TX_VFO == i) {
237237
UI_DisplayFrequency(gInputBox, 31, i * 4, true, false);
238238
} else {
239-
if (!IS_MR_CHANNEL(gEeprom.ScreenChannel[i]) || gEeprom.CHANNEL_DISPLAY_MODE == MDF_FREQUENCY) {
239+
if (!IS_MR_CHANNEL(gEeprom.ScreenChannel[i])) {
240240
if (gCurrentFunction == FUNCTION_TRANSMIT) {
241241
if (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) {
242242
Channel = gEeprom.RX_VFO;
@@ -262,16 +262,16 @@ void UI_DisplayMain(void)
262262
}
263263
}
264264
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1);
265-
} else if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_CHANNEL) {
266-
sprintf(String, "CH-%03d", gEeprom.ScreenChannel[i] + 1);
267-
UI_PrintString(String, 31, 112, i * 4, 8, true);
268-
} else if (gEeprom.CHANNEL_DISPLAY_MODE == MDF_NAME) {
269-
if(gEeprom.VfoInfo[i].Name[0] == 0 || gEeprom.VfoInfo[i].Name[0] == 0xFF) {
265+
} else {
266+
const char *pName = gEeprom.VfoInfo[i].Name;
267+
if (pName[0] == 0 || pName[0] == (char)0xFF) {
270268
sprintf(String, "CH-%03d", gEeprom.ScreenChannel[i] + 1);
271269
UI_PrintString(String, 31, 112, i * 4, 8, true);
272270
} else {
273-
UI_PrintString(gEeprom.VfoInfo[i].Name, 31, 112, i * 4, 8, true);
271+
UI_PrintString(pName, 31, 112, i * 4, 8, true);
274272
}
273+
NUMBER_ToDigits(gEeprom.ScreenChannel[i] + 1, String);
274+
UI_DisplaySmallDigits(3, String + 5, 112, Line + 1);
275275
}
276276
}
277277
}
@@ -377,4 +377,3 @@ void UI_DisplayMain(void)
377377

378378
ST7565_BlitFullScreen();
379379
}
380-

0 commit comments

Comments
 (0)