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 tx_wiper; ///< Baseband TX potentiometer
|
||||||
uint16_t rx_wiper; ///< Baseband RX potentiometer
|
uint16_t rx_wiper; ///< Baseband RX potentiometer
|
||||||
uint8_t mic_gain; ///< Microphone gain
|
uint8_t mic_gain; ///< Microphone gain
|
||||||
uint8_t tx_invert : 1, ///< Invert TX baseband
|
uint8_t bb_tx_invert : 1, ///< Invert TX baseband
|
||||||
rx_invert : 1, ///< Invert RX baseband
|
bb_rx_invert : 1, ///< Invert RX baseband
|
||||||
ptt_in_level : 1, ///< PTT in acive level
|
ptt_in_level : 1, ///< PTT in acive level
|
||||||
ptt_out_level : 1, ///< PTT out active level
|
ptt_out_level : 1, ///< PTT out active level
|
||||||
_padding : 4;
|
_padding : 4;
|
||||||
|
|
|
@ -94,8 +94,8 @@ void OpMode_M17::update(rtxStatus_t *const status, const bool newCfg)
|
||||||
//
|
//
|
||||||
// Get phase inversion settings from calibration.
|
// Get phase inversion settings from calibration.
|
||||||
//
|
//
|
||||||
invertTxPhase = (mod17CalData.tx_invert == 1) ? true : false;
|
invertTxPhase = (mod17CalData.bb_tx_invert == 1) ? true : false;
|
||||||
invertRxPhase = (mod17CalData.rx_invert == 1) ? true : false;
|
invertRxPhase = (mod17CalData.bb_rx_invert == 1) ? true : false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Main FSM logic
|
// Main FSM logic
|
||||||
|
|
|
@ -540,13 +540,13 @@ void _ui_changeRxWiper(int variation)
|
||||||
void _ui_changeTxInvert(int variation)
|
void _ui_changeTxInvert(int variation)
|
||||||
{
|
{
|
||||||
// Inversion can be 1 or 0, bit field value ensures no overflow
|
// 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)
|
void _ui_changeRxInvert(int variation)
|
||||||
{
|
{
|
||||||
// Inversion can be 1 or 0, bit field value ensures no overflow
|
// 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)
|
void _ui_changeMicGain(int variation)
|
||||||
|
@ -966,8 +966,8 @@ void ui_updateFSM(bool *sync_rtx)
|
||||||
// Reset calibration values
|
// Reset calibration values
|
||||||
mod17CalData.tx_wiper = 0x080;
|
mod17CalData.tx_wiper = 0x080;
|
||||||
mod17CalData.rx_wiper = 0x080;
|
mod17CalData.rx_wiper = 0x080;
|
||||||
mod17CalData.tx_invert = 0;
|
mod17CalData.bb_tx_invert = 0;
|
||||||
mod17CalData.rx_invert = 0;
|
mod17CalData.bb_rx_invert = 0;
|
||||||
mod17CalData.mic_gain = 0;
|
mod17CalData.mic_gain = 0;
|
||||||
|
|
||||||
state_resetSettingsAndVfo();
|
state_resetSettingsAndVfo();
|
||||||
|
|
|
@ -232,10 +232,10 @@ int _ui_getModule17ValueName(char *buf, uint8_t max_len, uint8_t index)
|
||||||
snprintf(buf, max_len, "%d", mod17CalData.rx_wiper);
|
snprintf(buf, max_len, "%d", mod17CalData.rx_wiper);
|
||||||
break;
|
break;
|
||||||
case D_TXINVERT:
|
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;
|
break;
|
||||||
case D_RXINVERT:
|
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;
|
break;
|
||||||
case D_MICGAIN:
|
case D_MICGAIN:
|
||||||
snprintf(buf, max_len, "%s", mic_gain_values[mod17CalData.mic_gain]);
|
snprintf(buf, max_len, "%s", mic_gain_values[mod17CalData.mic_gain]);
|
||||||
|
|
|
@ -74,8 +74,8 @@ void platform_init()
|
||||||
/* Set defaults for calibration */
|
/* Set defaults for calibration */
|
||||||
mod17CalData.tx_wiper = 0x080;
|
mod17CalData.tx_wiper = 0x080;
|
||||||
mod17CalData.rx_wiper = 0x080;
|
mod17CalData.rx_wiper = 0x080;
|
||||||
mod17CalData.tx_invert = 0;
|
mod17CalData.bb_tx_invert = 0;
|
||||||
mod17CalData.rx_invert = 0;
|
mod17CalData.bb_rx_invert = 0;
|
||||||
mod17CalData.mic_gain = 0;
|
mod17CalData.mic_gain = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Ładowanie…
Reference in New Issue