From 5d6e8ad9c621b32d2aa0ae573c9dd920e3d055f6 Mon Sep 17 00:00:00 2001 From: m5evt <60316466+m5evt@users.noreply.github.com> Date: Tue, 28 Apr 2020 14:04:23 +0100 Subject: [PATCH] Fix p1 audio send back to radio --- protocol1.c | 8 +++----- receiver.c | 4 +++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/protocol1.c b/protocol1.c index 0c53408..e4b30b6 100644 --- a/protocol1.c +++ b/protocol1.c @@ -911,10 +911,8 @@ static void process_ozy_input_buffer(char *buffer) { } #endif -// No longer used, all packets sent to radio are through full protocol1_iq_samples or -// protocol1_eer_iq_samples +// Send rx audio back to radio void protocol1_audio_samples(RECEIVER *rx,short left_audio_sample,short right_audio_sample) { - return; if(!isTransmitting(radio)) { // if(rx->mixed_audio==0) { rx->mixed_left_audio=left_audio_sample; @@ -1361,7 +1359,7 @@ void ozy_send_buffer() { output_buffer[C2]|=0x02; } - if ((radio->model=HERMES_LITE) && (radio->enable_pa)) { + if ((radio->discovered->device==DEVICE_HERMES_LITE2) && (radio->enable_pa)) { output_buffer[C2]|=0x2C; } else { @@ -1369,7 +1367,7 @@ void ozy_send_buffer() { output_buffer[C2]|=0x2C; } } - if(((radio->filter_board==APOLLO) || (radio->model=HERMES_LITE)) && radio->tune) { + if(((radio->filter_board==APOLLO) || (radio->discovered->device==DEVICE_HERMES_LITE2)) && radio->tune) { output_buffer[C2]|=0x10; } diff --git a/receiver.c b/receiver.c index aa076cf..0e65de0 100644 --- a/receiver.c +++ b/receiver.c @@ -965,7 +965,9 @@ static void process_rx_buffer(RECEIVER *rx) { } switch(radio->discovered->protocol) { case PROTOCOL_1: - //protocol1_audio_samples(rx,left_audio_sample,right_audio_sample); + if(radio->discovered->device!=DEVICE_HERMES_LITE2) { + protocol1_audio_samples(rx,left_audio_sample,right_audio_sample); + } break; case PROTOCOL_2: protocol2_audio_samples(rx,left_audio_sample,right_audio_sample);