Added CTCSS TX tone

This commit is contained in:
Silvano Seva 2020-12-05 14:41:52 +01:00
parent 41d09ce28e
commit 2c0b75b221
1 changed files with 10 additions and 1 deletions

View File

@ -189,6 +189,14 @@ void _updateC5000IQparams()
C5000_setModAmplitude(I, Q); C5000_setModAmplitude(I, Q);
} }
void _setCTCSS()
{
if((rtxStatus.opMode == FM) && (rtxStatus.txTone != 0))
{
float tone = ((float) rtxStatus.txTone) / 10.0f;
toneGen_setToneFreq(tone);
}
}
void rtx_init() void rtx_init()
@ -350,9 +358,10 @@ void rtx_taskFunc()
_setOpMode(); _setOpMode();
_setBandwidth(); _setBandwidth();
_updateC5000IQparams(); _updateC5000IQparams();
_setCTCSS();
/* TODO: temporarily force to RX mode if rtx is off. */ /* TODO: temporarily force to RX mode if rtx is off. */
if(rtxStatus.opStatus == OFF) _enableRx(); if(rtxStatus.opStatus == OFF) _enableRxStage();
} }
if(platform_getPttStatus() && (rtxStatus.opStatus != TX)) if(platform_getPttStatus() && (rtxStatus.opStatus != TX))