From 384bb0cc91a0cc65dc364d53f087810cb816cb82 Mon Sep 17 00:00:00 2001 From: spm81 Date: Mon, 8 Jan 2024 16:45:15 +0000 Subject: [PATCH] Adapting the code LIVESEEK --- Makefile | 8 ++++---- ceccommon.c | 24 ++++++++++++------------ ceccommon.h | 4 ++-- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index f4e2d9b..06987ca 100644 --- a/Makefile +++ b/Makefile @@ -9,13 +9,13 @@ TARGET = firmware # ---- STOCK QUANSHENG FERATURES ---- ENABLE_AIRCOPY := 0 # 3856 bytes -ENABLE_FMRADIO := 1 +ENABLE_FMRADIO := 0 # 84 bytes ENABLE_FLASHLIGHT_SOS := 0 ENABLE_UART := 1 ENABLE_UART_CAT := 0 # Bause we can cut more... - 4108 bytes -ENABLE_DTMF_CALLING := 1 +ENABLE_DTMF_CALLING := 0 # 1750Hz & 1050Hz FN1 FN2 Tones ENABLE_DTMF_SIDETONES := 1 ENABLE_TX1750 := 0 @@ -57,7 +57,7 @@ ENABLE_MESSENGER_SHOW_RX_TX_FREQ := 1 ENABLE_MESSENGER_UART := 1 # ---- EXTRA: SPECTRUM ---- -ENABLE_SPECTRUM := 1 +ENABLE_SPECTRUM := 0 ENABLE_SPECTRUM_NUNU := 0 SPECTRUM_AUTOMATIC_SQUELCH := 1 SPECTRUM_EXTRA_VALUES := 1 @@ -65,7 +65,7 @@ ENABLE_ALL_REGISTERS := 0 ENABLE_MATOZ_KEYS := 1 #Thanks to KD8CEC for sharing his code / We have to check the code better, i just code & paste it to the right places... -ENABLE_LIVESEEK_MHZ_KEYPAD := 0 +ENABLE_LIVESEEK_MHZ_KEYPAD := 1 # ---- DEBUGGING ---- # ---- COMPILER/LINKER OPTIONS ---- diff --git a/ceccommon.c b/ceccommon.c index 4deddc1..ebcf31d 100644 --- a/ceccommon.c +++ b/ceccommon.c @@ -47,13 +47,13 @@ void DisplayIntLog(char* displayMessage, int _logInt1, int _logInt2) memset(gFrameBuffer, 0, sizeof(gFrameBuffer)); sprintf(tmpBuff, "%s : %d", displayMessage, _logInt1); - UI_PrintString(tmpBuff, 2, 127, 0, 8); + UI_PrintString(tmpBuff, 2, 127, 0, 8, true); sprintf(tmpBuff, "1: %u", _logInt1); - UI_PrintString(tmpBuff, 2, 127, 2, 8); + UI_PrintString(tmpBuff, 2, 127, 2, 8, true); sprintf(tmpBuff, "2: %u", _logInt2); - UI_PrintString(tmpBuff, 2, 127, 4, 8); + UI_PrintString(tmpBuff, 2, 127, 4, 8, true); ST7565_BlitFullScreen(); } @@ -132,12 +132,12 @@ void DrawCommBuffToSpectrum(void) _lowValue = CommBuff[i]; } - //DrawFrequencyKhzSmall(gTxVfo->freq_config_RX.Frequency, lastSeekDirection == 12 ? 100 : 0, 55, 3); + //DrawFrequencyKhzSmall(gTxVfo->ConfigRX.Frequency, lastSeekDirection == 12 ? 100 : 0, 55, 3); - //DrawFrequencyKhzSmall(gTxVfo->freq_config_RX.Frequency + (gTxVfo->StepFrequency * 64) * (lastSeekDirection == 12 ? -1 : 1), + //DrawFrequencyKhzSmall(gTxVfo->ConfigRX.Frequency + (gTxVfo->StepFrequency * 64) * (lastSeekDirection == 12 ? -1 : 1), // 57, 55, 3); - //DrawFrequencyKhzSmall(gTxVfo->freq_config_RX.Frequency + (gTxVfo->StepFrequency * 127) * (lastSeekDirection == 12 ? -1 : 1), + //DrawFrequencyKhzSmall(gTxVfo->ConfigRX.Frequency + (gTxVfo->StepFrequency * 127) * (lastSeekDirection == 12 ? -1 : 1), // lastSeekDirection == 12 ? 0 : 100, 55, 3); memset(gFrameBuffer[6], 0, 128); //Clear Last Line @@ -162,7 +162,7 @@ void DrawCommBuffToSpectrum(void) else if (_drawTextPosition < 0) { _drawTextPosition = 0; - _drawFreq = gTxVfo->freq_config_RX.Frequency - (gTxVfo->StepFrequency * 127); + _drawFreq = gTxVfo->ConfigRX.Frequency - (gTxVfo->StepFrequency * 127); } } else @@ -174,7 +174,7 @@ void DrawCommBuffToSpectrum(void) else if (_drawTextPosition > 73) { _drawTextPosition = 73; - _drawFreq = gTxVfo->freq_config_RX.Frequency + (gTxVfo->StepFrequency * 127); + _drawFreq = gTxVfo->ConfigRX.Frequency + (gTxVfo->StepFrequency * 127); } } @@ -217,7 +217,7 @@ void CEC_ApplyChangeRXFreq(int _applyOption) if (CEC_LiveSeekMode == LIVESEEK_NONE) return; - BK4819_SetFrequency(gTxVfo->freq_config_RX.Frequency); + BK4819_SetFrequency(gTxVfo->ConfigRX.Frequency); BK4819_RX_TurnOn(); //BK4819_SetFrequency(frequency); @@ -234,7 +234,7 @@ void CEC_ApplyChangeRXFreq(int _applyOption) if (lastSeekDirection != _applyOption || (millis10() -CommBuffLastUseTime > 70)) { memset(CommBuff, 0, sizeof(CommBuff)); - rssiStartFreq = gTxVfo->freq_config_RX.Frequency; + rssiStartFreq = gTxVfo->ConfigRX.Frequency; addRssiCount = 0; CommValue1 = gCurrentFunction; } @@ -261,12 +261,12 @@ void CEC_ApplyChangeRXFreq(int _applyOption) if (gEeprom.SQUELCH_LEVEL == 0) { if (addRssiCount > 2) - APP_StartListening(FUNCTION_MONITOR); + APP_StartListening(FUNCTION_MONITOR, true); //delay(200); } else if (tmpRssi > STOP_RSSI_LIMIT) { - APP_StartListening(FUNCTION_MONITOR); + APP_StartListening(FUNCTION_MONITOR, true); delay(STOP_RSSI_TIME); RADIO_SetupRegisters(true); } diff --git a/ceccommon.h b/ceccommon.h index 1834bb5..a98639e 100644 --- a/ceccommon.h +++ b/ceccommon.h @@ -80,8 +80,8 @@ extern uint8_t CEC_LiveSeekMode; //0:NONE, 1:LIVE, 2:LIVE+1, 3:LIVE+2 #define GET_FREQ_OFFSET(__rxmode__) ( CW_LR_MODE (__rxmode__ == MODULATION_CW ||__rxmode__ == MODULATION_CWN ? (CWTone) : 0)) #define delay(delayTime) SYSTEM_DelayMs(delayTime) -ChannelAttributes_t MR_ChannelAttributes(int _channelIndex); -void SetMR_ChannelAttributes(int channel, ChannelAttributes_t att); +uint8_t MR_ChannelAttributes(int _channelIndex); +void SetMR_ChannelAttributes(int channel, uint8_t att); void CEC_ApplyChangeRXFreq(int _applyOption); void CEC_TimeSlice500ms(void); void DrawCommBuffToSpectrum(void);