Fix the spectrum labels, bandscope build, OOK on F+7, save flash
- Spectrum: GUI_DisplaySmallest() now draws with gFontSmall (7 px per character) for the status bar; the spectrum layout needs the 3x5 font (4 px), so it gets its own renderer again. Its labels were overlapping. - make BANDSCOPE=1: spectrum instead of the FM radio. Both do not fit in 60 KB together (FM radio is 4.9 KB). Debug log off and -finline-limit=1 in that edition; it fits with a few bytes to spare. - OOK sender on F+7 / long 7 (the VOX key is free, VOX is not built); F+EXIT is back to only cancelling F. - POCSAG deviation tuning keys behind POCSAG_DEVIATION_TUNING (default 0). - Smaller code: shared end of SMS/POCSAG transmissions, non-inlined fast SPI wait, compact OOK field tables, sprintf message header, shorter OOK strings. - Makefile: EXTRA_CFLAGS for passing defines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
No files matched your search
+4
-21
@@ -3,6 +3,7 @@
|
||||
//
|
||||
|
||||
#include "messages.h"
|
||||
#include "../external/printf/printf.h"
|
||||
|
||||
|
||||
// Convert a 32-bit number to a string (10 digits, zero-padded)
|
||||
@@ -74,27 +75,9 @@ void UI_DisplayMessages(void) {
|
||||
gActiveMessage = (startIndex + pageOffset + ixa) % MESSAGES_COUNT;
|
||||
MESSAGES_GET();
|
||||
|
||||
// Build the display string
|
||||
if (loadedPacket.flags & MESSAGE_FLAG_POCSAG) {
|
||||
char capcodeString[11];
|
||||
u32_to_str(loadedPacket.src, capcodeString);
|
||||
String[0] = 'P';
|
||||
String[1] = ':';
|
||||
memcpy(String + 2, capcodeString + 3, 7);
|
||||
String[9] = ' ';
|
||||
} else {
|
||||
u32_to_str(loadedPacket.src, &String[0]);
|
||||
}
|
||||
String[10] = '-';
|
||||
u8_to_str(loadedPacket.seq, &String[11]);
|
||||
String[14] = '-';
|
||||
|
||||
// Display a visual index (0,1,2,3... not EEPROM slot)
|
||||
uint8_t visualIndex = ixa + pageOffset;
|
||||
String[15] = (visualIndex < 10) ? ('0' + visualIndex) : ('A' + visualIndex - 10);
|
||||
String[16] = '-';
|
||||
String[17] = (gActiveMessage < 10) ? ('0' + gActiveMessage) : ('A' + gActiveMessage - 10);
|
||||
String[18] = 0;
|
||||
// header: sender (POCSAG: "P:" + RIC), sequence, position in the list, EEPROM slot
|
||||
sprintf(String, (loadedPacket.flags & MESSAGE_FLAG_POCSAG) ? "P:%07lu -%03u-%X-%X" : "%010lu-%03u-%X-%X",
|
||||
(unsigned long) loadedPacket.src, loadedPacket.seq, ixa + pageOffset, gActiveMessage);
|
||||
|
||||
// header line, then the text wrapped over MESSAGES_TEXT_LINES lines
|
||||
const uint8_t line = ixa * (1U + MESSAGES_TEXT_LINES);
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@ void OOKSENDER_Display(void) {
|
||||
sprintf(String, "%c %s", gOOKSenderProtocol == i ? '>' : ' ', OOKPROTONAMES[i]);
|
||||
UI_PrintStringSmallNormal(String, 0, 0, 1 + i);
|
||||
}
|
||||
UI_PrintStringSmallNormal("MENU select", 0, 0, 7);
|
||||
UI_PrintStringSmallNormal("MENU = OK", 0, 0, 7);
|
||||
break;
|
||||
|
||||
case OOKSENDER_DATA_INPUT:
|
||||
@@ -61,7 +61,7 @@ void OOKSENDER_Display(void) {
|
||||
sprintf(String, "%c%-6s %s", gOOKSenderField == f ? '>' : ' ', label, value);
|
||||
UI_PrintStringSmallNormal(String, 0, 0, line++);
|
||||
}
|
||||
UI_PrintStringSmallNormal(gOOKSenderState == OOKSENDER_SENDING ? "SENDING..." : "PTT/MENU send",
|
||||
UI_PrintStringSmallNormal(gOOKSenderState == OOKSENDER_SENDING ? "Sending" : "PTT send",
|
||||
0, 0, 7);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user