From 65cfd2762d77185e8f05dc3d88ad43e29fc6a527 Mon Sep 17 00:00:00 2001 From: DL1YCF Date: Sat, 28 Dec 2019 15:42:19 +0100 Subject: [PATCH] removed old RADIOBERRY att value specification --- old_protocol.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/old_protocol.c b/old_protocol.c index b0514a3..4318f53 100644 --- a/old_protocol.c +++ b/old_protocol.c @@ -1172,21 +1172,6 @@ void ozy_send_buffer() { if(active_receiver->dither) { output_buffer[C3]|=LT2208_DITHER_ON; } -#ifdef RADIOBERRY - // - // RadioBerry seems to encode the RXgain different from HERMES_LITE: - // the dither bit is hi-jacked for bit5 of RXgain - // - if (have_rx_gain) { - output_buffer[C3] &= ~LT2208_DITHER_ON; // clear dither bit if if was set - int rxgain = rx_gain_calibration - adc_attenuation[active_receiver->adc]; - if (rxgain < 0) rxgain=0; - if (rxgain > 60) rxgain=60; - if (rxgain > 31) { - output_buffer[C3]|=LT2208_DITHER_ON; - } - } -#endif if (filter_board == CHARLY25 && active_receiver->preamp) { output_buffer[C3]|=LT2208_GAIN_ON; } @@ -1473,21 +1458,12 @@ void ozy_send_buffer() { int rxgain = rx_gain_calibration - adc_attenuation[active_receiver->adc]; if (rxgain < 0) rxgain=0; if (rxgain > 60) rxgain=60; -#ifdef RADIOBERRY - // encode lower 5 bits of RXgain - if (isTransmitting()) { - output_buffer[C4]=0x20 | (transmitter->attenuation & 0x1F); - } else { - output_buffer[C4]=0x20 | (rxgain & 0x1F); - } -#else // encode all 6 bits of RXgain in ATT value and set bit6 if (isTransmitting()) { output_buffer[C4] = 0x40 | (31 - (transmitter->attenuation & 0x1F)); } else { output_buffer[C4] = 0x40 | (rxgain & 0x3F); } -#endif } else { if (isTransmitting()) { output_buffer[C4]=0x20 | (transmitter->attenuation & 0x1F); -- 2.45.2