Further updates to DSP, and significant changes to TS590. Implementing templated CAT commands using the delegate template from the ETL. Compiles, but not tested.
This commit is contained in:
+71
-3
@@ -165,11 +165,10 @@ void UBitxDSP::setupRxAudio() {
|
||||
audioCtrl.lineOutLevel(29, 31); // RX, TX
|
||||
|
||||
// Line Output (RX)
|
||||
lineOutAmp.gain(1.0);
|
||||
setLineOutLevel(1.0);
|
||||
|
||||
// USB Output (RX)
|
||||
usbOutAmp.gain(1.0);
|
||||
usbBypassAmp.gain(1.0);
|
||||
setUSBOutLevel(1.0);
|
||||
}
|
||||
|
||||
void UBitxDSP::setupTxAudio() {
|
||||
@@ -231,6 +230,27 @@ void UBitxDSP::unmuteRxIn(RxAudioCh ch) {
|
||||
}
|
||||
}
|
||||
|
||||
void UBitxDSP::setLineOutLevel(float level) {
|
||||
state.rxOut[LINE_OUT].level = level;
|
||||
lineOutAmp.gain(state.rxOut[LINE_OUT].mute ? 0.0 : state.rxOut[LINE_OUT].level);
|
||||
}
|
||||
|
||||
void UBitxDSP::setUSBOutLevel(float level) {
|
||||
state.rxOut[USB_OUT].level = level;
|
||||
usbOutAmp.gain(state.rxOut[USB_OUT].mute ? 0.0 : state.rxOut[USB_OUT].level);
|
||||
usbBypassAmp.gain(state.rxOut[USB_OUT].mute ? 0.0 : state.rxOut[USB_OUT].level);
|
||||
}
|
||||
|
||||
void UBitxDSP::setLineOut255(unsigned level) { setLineOutLevel<255>(level); }
|
||||
void UBitxDSP::setLineOut9(unsigned level) { setLineOutLevel<9>(level); }
|
||||
void UBitxDSP::setUSBOut255(unsigned level) { setUSBOutLevel<255>(level); }
|
||||
void UBitxDSP::setUSBOut9(unsigned level) { setUSBOutLevel<9>(level); }
|
||||
|
||||
unsigned UBitxDSP::getLineOut255() const { return getLineOutLevel<255>(); }
|
||||
unsigned UBitxDSP::getLineOut9() const { return getLineOutLevel<9>(); }
|
||||
unsigned UBitxDSP::getUSBOut255() const { return getUSBOutLevel<255>(); }
|
||||
unsigned UBitxDSP::getUSBOut9() const { return getUSBOutLevel<9>(); }
|
||||
|
||||
/**********************************************************************
|
||||
* Transmit audio chain
|
||||
**********************************************************************/
|
||||
@@ -286,6 +306,26 @@ void UBitxDSP::unmuteTxOut() {
|
||||
}
|
||||
}
|
||||
|
||||
void UBitxDSP::setLineInLevel(float level) {
|
||||
state.txIn[TX_LINE].level = level;
|
||||
txAudio.gain(TX_LINE, state.txIn[TX_LINE].mute ? 0.0 : state.txIn[TX_LINE].level);
|
||||
}
|
||||
|
||||
void UBitxDSP::setUSBInLevel(float level) {
|
||||
state.txIn[TX_USB].level = level;
|
||||
txAudio.gain(TX_USB, state.txIn[TX_USB].mute ? 0.0 : state.txIn[TX_USB].level);
|
||||
}
|
||||
|
||||
void UBitxDSP::setLineIn255(unsigned level) { setLineInLevel<255>(level); }
|
||||
void UBitxDSP::setLineIn9(unsigned level) { setLineInLevel<9>(level); }
|
||||
void UBitxDSP::setUSBIn255(unsigned level) { setUSBInLevel<255>(level); }
|
||||
void UBitxDSP::setUSBIn9(unsigned level) { setUSBInLevel<9>(level); }
|
||||
|
||||
unsigned UBitxDSP::getLineIn255() const { return getLineInLevel<255>(); }
|
||||
unsigned UBitxDSP::getLineIn9() const { return getLineInLevel<9>(); }
|
||||
unsigned UBitxDSP::getUSBIn255() const { return getUSBInLevel<255>(); }
|
||||
unsigned UBitxDSP::getUSBIn9() const { return getUSBInLevel<9>(); }
|
||||
|
||||
void UBitxDSP::setTxAudioIn(TxAudioIn src, bool isTemp) {
|
||||
if (!isTemp) {
|
||||
txSrc = src;
|
||||
@@ -426,6 +466,34 @@ void UBitxDSP::setRxFilterCenter(int center) {
|
||||
setRxFilter(lo, hi);
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* Transmit Voice-Operated-Switch (VOX)
|
||||
**********************************************************************/
|
||||
|
||||
void UBitxDSP::setLineVOXThresh9(unsigned level) {
|
||||
state.vox[TX_LINE].threshold = static_cast<float>(level) / 9.0;
|
||||
}
|
||||
|
||||
unsigned UBitxDSP::getLineVOXThresh9() const {
|
||||
return static_cast<unsigned>(state.vox[TX_LINE].threshold * 9.0);
|
||||
}
|
||||
|
||||
void UBitxDSP::setUSBVOXThresh9(unsigned level) {
|
||||
state.vox[TX_USB].threshold = static_cast<float>(level) / 9.0;
|
||||
}
|
||||
|
||||
unsigned UBitxDSP::getUSBVOXThresh9() const {
|
||||
return static_cast<unsigned>(state.vox[TX_USB].threshold * 9.0);
|
||||
}
|
||||
|
||||
void UBitxDSP::setDataVoxDelay(unsigned msec) {
|
||||
state.voxDelay = msec;
|
||||
}
|
||||
|
||||
unsigned UBitxDSP::getDataVoxDelay() const {
|
||||
return state.voxDelay;
|
||||
}
|
||||
|
||||
/**********************************************************************
|
||||
* Singleton - the DSP instance
|
||||
**********************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user