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
+27
-31
@@ -92,6 +92,7 @@ static uint16_t POCSAG_Baud(void)
|
||||
(2U << 4) | /* 25 kHz channel mode */ \
|
||||
(1U << 3))
|
||||
|
||||
#if POCSAG_DEVIATION_TUNING
|
||||
// Runtime-tunable TX deviation (REG_40<11:0>), keys 2/8 on the messages screen.
|
||||
uint16_t gPocsagDeviation = POCSAG_DEVIATION;
|
||||
|
||||
@@ -110,6 +111,9 @@ void POCSAG_AdjustDeviation(const int delta)
|
||||
UI_DisplayPopup(text);
|
||||
gUpdateDisplay = true;
|
||||
}
|
||||
#else
|
||||
#define gPocsagDeviation POCSAG_DEVIATION
|
||||
#endif
|
||||
|
||||
static uint16_t POCSAG_Raw16(const uint16_t logical)
|
||||
{
|
||||
@@ -540,6 +544,27 @@ void MSG_EnableRX(const bool enable) {
|
||||
}
|
||||
}
|
||||
|
||||
// Common end of a data transmission (SMS and POCSAG): back to RX, FSK RX re-armed.
|
||||
static void MSG_EndDataTransmission(const bool audioWasEnabled)
|
||||
{
|
||||
APP_EndTransmission();
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
gUpdateStatus = true;
|
||||
gUpdateDisplay = true;
|
||||
gFlagEndTransmission = false;
|
||||
|
||||
if (audioWasEnabled) {
|
||||
AUDIO_AudioPathOn();
|
||||
gEnableSpeaker = true;
|
||||
BK4819_ExitTxMute();
|
||||
}
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
|
||||
MSG_EnableRX(true);
|
||||
gVfoConfigureMode = VFO_CONFIGURE;
|
||||
dataPTR = gMessageText;
|
||||
}
|
||||
|
||||
void MSG_POCSAGSend(const uint32_t ric, const char *text)
|
||||
{
|
||||
uint8_t frame[POCSAG_MAX_FRAME_SIZE];
|
||||
@@ -613,22 +638,7 @@ void MSG_POCSAGSend(const uint32_t ric, const char *text)
|
||||
for (unsigned int i = 0; i < ARRAY_SIZE(savedRegs); i++)
|
||||
BK4819_WriteRegister(savedRegs[i], saved[i]);
|
||||
|
||||
APP_EndTransmission();
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
gUpdateStatus = true;
|
||||
gUpdateDisplay = true;
|
||||
gFlagEndTransmission = false;
|
||||
|
||||
if (audioWasEnabled) {
|
||||
AUDIO_AudioPathOn();
|
||||
gEnableSpeaker = true;
|
||||
BK4819_ExitTxMute();
|
||||
}
|
||||
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
|
||||
MSG_EnableRX(true);
|
||||
gVfoConfigureMode = VFO_CONFIGURE;
|
||||
dataPTR = gMessageText;
|
||||
MSG_EndDataTransmission(audioWasEnabled);
|
||||
}
|
||||
|
||||
void MSG_FSKSendData(DataPacket *dataPacketIn) {
|
||||
@@ -734,26 +744,12 @@ void MSG_FSKSendData(DataPacket *dataPacketIn) {
|
||||
BK4819_WriteRegister(BK4819_REG_51, css_val);
|
||||
|
||||
SYSTEM_DelayMs(50);
|
||||
APP_EndTransmission();
|
||||
FUNCTION_Select(FUNCTION_FOREGROUND);
|
||||
gUpdateStatus = true;
|
||||
gUpdateDisplay = true;
|
||||
gFlagEndTransmission = false;
|
||||
|
||||
if (isAudioOn) {
|
||||
AUDIO_AudioPathOn();
|
||||
gEnableSpeaker = true;
|
||||
BK4819_ExitTxMute();
|
||||
}
|
||||
|
||||
//if (!(dataPacketIn->flags & 0x64)) {
|
||||
if (!(dataPacketIn->flags & 0x40)) {
|
||||
gGotACK = false;
|
||||
}
|
||||
BK4819_ToggleGpioOut(BK4819_GPIO5_PIN1_RED, false);
|
||||
MSG_EnableRX(true);
|
||||
gVfoConfigureMode = VFO_CONFIGURE;
|
||||
dataPTR = gMessageText;
|
||||
MSG_EndDataTransmission(isAudioOn);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user