使用小点持续标记最后收发信道

This commit is contained in:
Silent YANG 2024-01-20 21:38:56 -08:00
parent 2202d76b4b
commit 56789d11c2

View file

@ -41,6 +41,8 @@
#include "ui/ui.h" #include "ui/ui.h"
center_line_t center_line = CENTER_LINE_NONE; center_line_t center_line = CENTER_LINE_NONE;
unsigned int last_rx_vfo = -1;
const int8_t dBmCorrTable[7] = { const int8_t dBmCorrTable[7] = {
-15, // band 1 -15, // band 1
-25, // band 2 -25, // band 2
@ -492,9 +494,8 @@ if (!gDTMF_InputMode) {
} else { // receiving .. show the RX symbol } else { // receiving .. show the RX symbol
mode = VFO_MODE_RX; mode = VFO_MODE_RX;
if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num) { if (FUNCTION_IsRx() && gEeprom.RX_VFO == vfo_num) {
last_rx_vfo = vfo_num;
memcpy( gFrameBuffer[line + 0] + 14, BITMAP_RECV, sizeof(BITMAP_RECV)); memcpy( gFrameBuffer[line + 0] + 14, BITMAP_RECV, sizeof(BITMAP_RECV));
} }
} }
@ -502,7 +503,7 @@ if (!gDTMF_InputMode) {
const unsigned int x = 2; const unsigned int x = 2;
const bool inputting = gInputBoxIndex != 0 && gEeprom.TX_VFO == vfo_num; const bool inputting = gInputBoxIndex != 0 && gEeprom.TX_VFO == vfo_num;
if (!inputting) if (!inputting)
sprintf(String, "M%u", gEeprom.ScreenChannel[vfo_num] + 1); last_rx_vfo == vfo_num ? sprintf(String, "M%u.", gEeprom.ScreenChannel[vfo_num] + 1) : sprintf(String, "M%u", gEeprom.ScreenChannel[vfo_num] + 1);
else else
sprintf(String, "M%.3s", INPUTBOX_GetAscii()); // show the input text sprintf(String, "M%.3s", INPUTBOX_GetAscii()); // show the input text
UI_PrintStringSmall(String, x, 0, line + 1); UI_PrintStringSmall(String, x, 0, line + 1);
@ -510,7 +511,7 @@ if (!gDTMF_InputMode) {
// show the frequency band number // show the frequency band number
const unsigned int x = 2; const unsigned int x = 2;
char *buf = gEeprom.VfoInfo[vfo_num].pRX->Frequency < _1GHz_in_KHz ? "" : "+"; char *buf = gEeprom.VfoInfo[vfo_num].pRX->Frequency < _1GHz_in_KHz ? "" : "+";
sprintf(String, "F%u%s", 1 + gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST, buf); last_rx_vfo == vfo_num ? sprintf(String, "F%u%s.", 1 + gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST, buf) : sprintf(String, "F%u%s", 1 + gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST, buf);
UI_PrintStringSmall(String, x, 0, line + 1); UI_PrintStringSmall(String, x, 0, line + 1);
} }
#ifdef ENABLE_NOAA #ifdef ENABLE_NOAA