Fix DTM TX-UP only

This commit is contained in:
OneOfEleven 2023-10-02 19:23:37 +01:00
parent 9ac3525683
commit c59e0ea06c
9 changed files with 52 additions and 53 deletions

View File

@ -22,7 +22,7 @@ ENABLE_CTCSS_TAIL_PHASE_SHIFT := 1
ENABLE_MAIN_KEY_HOLD := 1
ENABLE_BOOT_BEEPS := 0
ENABLE_COMPANDER := 1
ENABLE_SHOW_CHARGE_LEVEL := 1
ENABLE_SHOW_CHARGE_LEVEL := 0
ENABLE_REVERSE_BAT_SYMBOL := 1
ENABLE_CODE_SCAN_TIMEOUT := 0
ENABLE_AM_FIX := 1

View File

@ -641,9 +641,11 @@ static void FREQ_NextChannel(void)
RADIO_ConfigureSquelchAndOutputPower(gRxVfo);
RADIO_SetupRegisters(true);
gUpdateDisplay = true;
ScanPauseDelayIn_10ms = scan_pause_delay_in_6_10ms;
bScanKeepFrequency = false;
// ScanPauseDelayIn_10ms = scan_pause_delay_in_6_10ms;
ScanPauseDelayIn_10ms = 10; // 100ms
bScanKeepFrequency = false;
gUpdateDisplay = true;
}
static void MR_NextChannel(void)
@ -723,7 +725,7 @@ static void MR_NextChannel(void)
}
// ScanPauseDelayIn_10ms = scan_pause_delay_in_3_10ms;
ScanPauseDelayIn_10ms = 8; // 100ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ?
ScanPauseDelayIn_10ms = 8; // 80ms .. <= ~60ms it misses signals (squelch response and/or PLL lock time) ?
bScanKeepFrequency = false;
@ -1780,11 +1782,18 @@ void APP_TimeSlice500ms(void)
BATTERY_GetReadings(true);
}
// regular statusbar updates (once every 2 sec) if need be
// regular display updates (once every 2 sec) - if need be
if ((gBatteryCheckCounter & 3) == 0)
{
if (gChargingWithTypeC || gSetting_battery_text > 0)
gUpdateStatus = true;
#ifdef ENABLE_SHOW_CHARGE_LEVEL
if (gChargingWithTypeC)
gUpdateDisplay = true;
#endif
}
if (gCurrentFunction != FUNCTION_POWER_SAVE)
updateRSSI(gEeprom.RX_CHANNEL);

View File

@ -387,11 +387,13 @@ void DTMF_Reply(void)
case DTMF_REPLY_NONE:
if (gDTMF_CallState != DTMF_CALL_STATE_NONE ||
gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_OFF ||
gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_BOT)
gCurrentVfo->DTMF_PTT_ID_TX_MODE == PTT_ID_EOT)
{
gDTMF_ReplyState = DTMF_REPLY_NONE;
return;
}
// send TX-UP DTMF
pString = gEeprom.DTMF_UP_CODE;
break;
}

Binary file not shown.

Binary file not shown.

View File

@ -25,6 +25,7 @@ const freq_band_table_t BX4819_band2 = {84000000, 130000000};
const freq_band_table_t frequencyBandTable[7] =
{
#ifndef ENABLE_WIDE_RX
// QS original
{ 5000000, 7600000},
{10800000, 13600000},
{13600000, 17400000},
@ -33,6 +34,7 @@ const freq_band_table_t frequencyBandTable[7] =
{40000000, 47000000},
{47000000, 60000000}
#else
// extended range
{ 1800000, 10800000},
{10800000, 13600000},
{13600000, 17400000},
@ -59,28 +61,12 @@ const freq_band_table_t frequencyBandTable[7] =
};
#endif
#if 0
const uint16_t StepFrequencyTable[7] =
{
250,
500,
625,
1000,
1250,
2500,
833
};
#ifndef ENABLE_12_5KHZ_STEP
// QS steps (*10 Hz)
const uint16_t StepFrequencyTable[7] = {250, 500, 625, 1000, 1250, 2500, 833};
#else
const uint16_t StepFrequencyTable[7] =
{
125,
250,
625,
1000,
1250,
2500,
833
};
// includes 1.25kHz step
const uint16_t StepFrequencyTable[7] = {125, 250, 625, 1000, 1250, 2500, 833};
#endif
FREQUENCY_Band_t FREQUENCY_GetBand(uint32_t Frequency)
@ -89,7 +75,8 @@ FREQUENCY_Band_t FREQUENCY_GetBand(uint32_t Frequency)
for (band = ARRAY_SIZE(frequencyBandTable) - 1; band >= 0; band--)
if (Frequency >= frequencyBandTable[band].lower)
// if (Frequency < frequencyBandTable[band].upper)
return band;
return (FREQUENCY_Band_t)band;
return BAND1_50MHz;
// return BAND_NONE;
}

View File

@ -19,7 +19,7 @@
#include <stdint.h>
//#include "radio.h"
#define ENABLE_12_5KHZ_STEP
typedef struct {
const uint32_t lower;
@ -43,7 +43,8 @@ enum FREQUENCY_Band_t {
};
typedef enum FREQUENCY_Band_t FREQUENCY_Band_t;
#if 0
#ifndef ENABLE_12_5KHZ_STEP
// QS steps
enum STEP_Setting_t {
STEP_2_5kHz = 0,
STEP_5_0kHz,
@ -54,6 +55,7 @@ typedef enum FREQUENCY_Band_t FREQUENCY_Band_t;
STEP_8_33kHz
};
#else
// includes 1.25kHz step
enum STEP_Setting_t {
STEP_1_25kHz = 0,
STEP_2_5kHz,
@ -66,12 +68,12 @@ typedef enum FREQUENCY_Band_t FREQUENCY_Band_t;
#endif
typedef enum STEP_Setting_t STEP_Setting_t;
extern const uint16_t StepFrequencyTable[7];
#ifdef ENABLE_NOAA
extern const uint32_t NoaaFrequencyTable[10];
#endif
extern const uint16_t StepFrequencyTable[7];
FREQUENCY_Band_t FREQUENCY_GetBand(uint32_t Frequency);
uint8_t FREQUENCY_CalculateOutputPower(uint8_t TxpLow, uint8_t TxpMid, uint8_t TxpHigh, int32_t LowerLimit, int32_t Middle, int32_t UpperLimit, int32_t Frequency);
uint32_t FREQUENCY_FloorToStep(uint32_t Upper, uint32_t Step, uint32_t Lower);
@ -80,4 +82,3 @@ int TX_freq_check(const uint32_t Frequency);
int RX_freq_check(const uint32_t Frequency);
#endif

View File

@ -43,10 +43,10 @@ enum {
};
enum PTT_ID_t {
PTT_ID_OFF = 0,
PTT_ID_BOT,
PTT_ID_EOT,
PTT_ID_BOTH
PTT_ID_OFF = 0, // OFF
PTT_ID_BOT, // BEGIN OF TX
PTT_ID_EOT, // END OF TX
PTT_ID_BOTH // BOTH
};
typedef enum PTT_ID_t PTT_ID_t;

View File

@ -455,7 +455,7 @@ void UI_DisplayMenu(void)
#endif
case MENU_STEP:
sprintf(String, "%d.%02uKHz", StepFrequencyTable[gSubMenuSelection] / 100, abs(StepFrequencyTable[gSubMenuSelection]) % 100);
sprintf(String, "%d.%02ukHz", StepFrequencyTable[gSubMenuSelection] / 100, abs(StepFrequencyTable[gSubMenuSelection]) % 100);
break;
case MENU_TXP: