kopia lustrzana https://github.com/OpenRTX/OpenRTX
Module17: renamed calibration fields for TX/RX baseband inversion
rodzic
ed92d81543
commit
8550e4f7a6
|
@ -33,8 +33,8 @@ typedef struct
|
|||
uint16_t tx_wiper; ///< Baseband TX potentiometer
|
||||
uint16_t rx_wiper; ///< Baseband RX potentiometer
|
||||
uint8_t mic_gain; ///< Microphone gain
|
||||
uint8_t tx_invert : 1, ///< Invert TX baseband
|
||||
rx_invert : 1, ///< Invert RX baseband
|
||||
uint8_t bb_tx_invert : 1, ///< Invert TX baseband
|
||||
bb_rx_invert : 1, ///< Invert RX baseband
|
||||
ptt_in_level : 1, ///< PTT in acive level
|
||||
ptt_out_level : 1, ///< PTT out active level
|
||||
_padding : 4;
|
||||
|
|
|
@ -94,8 +94,8 @@ void OpMode_M17::update(rtxStatus_t *const status, const bool newCfg)
|
|||
//
|
||||
// Get phase inversion settings from calibration.
|
||||
//
|
||||
invertTxPhase = (mod17CalData.tx_invert == 1) ? true : false;
|
||||
invertRxPhase = (mod17CalData.rx_invert == 1) ? true : false;
|
||||
invertTxPhase = (mod17CalData.bb_tx_invert == 1) ? true : false;
|
||||
invertRxPhase = (mod17CalData.bb_rx_invert == 1) ? true : false;
|
||||
#endif
|
||||
|
||||
// Main FSM logic
|
||||
|
|
|
@ -540,13 +540,13 @@ void _ui_changeRxWiper(int variation)
|
|||
void _ui_changeTxInvert(int variation)
|
||||
{
|
||||
// Inversion can be 1 or 0, bit field value ensures no overflow
|
||||
mod17CalData.tx_invert += variation;
|
||||
mod17CalData.bb_tx_invert += variation;
|
||||
}
|
||||
|
||||
void _ui_changeRxInvert(int variation)
|
||||
{
|
||||
// Inversion can be 1 or 0, bit field value ensures no overflow
|
||||
mod17CalData.rx_invert += variation;
|
||||
mod17CalData.bb_rx_invert += variation;
|
||||
}
|
||||
|
||||
void _ui_changeMicGain(int variation)
|
||||
|
@ -964,11 +964,11 @@ void ui_updateFSM(bool *sync_rtx)
|
|||
ui_state.edit_mode = false;
|
||||
|
||||
// Reset calibration values
|
||||
mod17CalData.tx_wiper = 0x080;
|
||||
mod17CalData.rx_wiper = 0x080;
|
||||
mod17CalData.tx_invert = 0;
|
||||
mod17CalData.rx_invert = 0;
|
||||
mod17CalData.mic_gain = 0;
|
||||
mod17CalData.tx_wiper = 0x080;
|
||||
mod17CalData.rx_wiper = 0x080;
|
||||
mod17CalData.bb_tx_invert = 0;
|
||||
mod17CalData.bb_rx_invert = 0;
|
||||
mod17CalData.mic_gain = 0;
|
||||
|
||||
state_resetSettingsAndVfo();
|
||||
nvm_writeSettings(&state.settings);
|
||||
|
|
|
@ -232,10 +232,10 @@ int _ui_getModule17ValueName(char *buf, uint8_t max_len, uint8_t index)
|
|||
snprintf(buf, max_len, "%d", mod17CalData.rx_wiper);
|
||||
break;
|
||||
case D_TXINVERT:
|
||||
snprintf(buf, max_len, "%s", phase_values[mod17CalData.tx_invert]);
|
||||
snprintf(buf, max_len, "%s", phase_values[mod17CalData.bb_tx_invert]);
|
||||
break;
|
||||
case D_RXINVERT:
|
||||
snprintf(buf, max_len, "%s", phase_values[mod17CalData.rx_invert]);
|
||||
snprintf(buf, max_len, "%s", phase_values[mod17CalData.bb_rx_invert]);
|
||||
break;
|
||||
case D_MICGAIN:
|
||||
snprintf(buf, max_len, "%s", mic_gain_values[mod17CalData.mic_gain]);
|
||||
|
|
|
@ -72,11 +72,11 @@ void platform_init()
|
|||
audio_init();
|
||||
|
||||
/* Set defaults for calibration */
|
||||
mod17CalData.tx_wiper = 0x080;
|
||||
mod17CalData.rx_wiper = 0x080;
|
||||
mod17CalData.tx_invert = 0;
|
||||
mod17CalData.rx_invert = 0;
|
||||
mod17CalData.mic_gain = 0;
|
||||
mod17CalData.tx_wiper = 0x080;
|
||||
mod17CalData.rx_wiper = 0x080;
|
||||
mod17CalData.bb_tx_invert = 0;
|
||||
mod17CalData.bb_rx_invert = 0;
|
||||
mod17CalData.mic_gain = 0;
|
||||
|
||||
/*
|
||||
* Hardware version is set using a voltage divider on PA3.
|
||||
|
|
Ładowanie…
Reference in New Issue