Transceiver: Allow sending negative nominal tx power in RSP NOMTXPOWER

Some SDR devices under some bands may provide only under 0 dBm Tx Power.

Change-Id: I8cecb7a37eb80db341a624eb7b826180eac4a1d4
This commit is contained in:
Pau Espin 2020-06-19 14:48:35 +02:00 committed by pespin
parent b536ab9bdf
commit 405f17a98c
1 changed files with 1 additions and 4 deletions

View File

@ -904,10 +904,7 @@ int Transceiver::ctrl_sock_handle_rx(int chan)
sprintf(response, "RSP ADJPOWER 0 %d", power);
} else if (match_cmd(command, "NOMTXPOWER", NULL)) {
int power = mRadioInterface->getNominalTxPower(chan);
if (power > 0)
sprintf(response, "RSP NOMTXPOWER 0 %d", power);
else
sprintf(response, "RSP NOMTXPOWER 1 %d", -power);
sprintf(response, "RSP NOMTXPOWER 0 %d", power);
} else if (match_cmd(command, "RXTUNE", &params)) {
// tune receiver
int freqKhz;