Skip to content

Commit

Permalink
Adapting the code LIVESEEK
Browse files Browse the repository at this point in the history
  • Loading branch information
spm81 committed Jan 8, 2024
1 parent db65316 commit 384bb0c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -57,15 +57,15 @@ 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
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 ----
Expand Down
24 changes: 12 additions & 12 deletions ceccommon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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);
}
}

Expand Down Expand Up @@ -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);
Expand All @@ -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;
}
Expand All @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions ceccommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 384bb0c

Please sign in to comment.