From ede6775ac3f8493ebdbedcf2c7cff8fc84101620 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Thu, 1 Aug 2024 17:19:38 +0200 Subject: [PATCH] fix for compilers that don't support the CMPLX() macro --- radio/rfsimulator/apply_channelmod.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radio/rfsimulator/apply_channelmod.c b/radio/rfsimulator/apply_channelmod.c index 5bb207e5be..dc35a9bf73 100644 --- a/radio/rfsimulator/apply_channelmod.c +++ b/radio/rfsimulator/apply_channelmod.c @@ -166,7 +166,11 @@ void rxAddInput(const c16_t *input_sig, } if (channelDesc->Doppler_phase_inc != 0.0) { +#ifdef CMPLX double complex in = CMPLX(rx_tmp.r, rx_tmp.i); +#else + double complex in = rx_tmp.r + rx_tmp.i * I; +#endif double complex out = in * cexp(channelDesc->Doppler_phase_cur[rxAnt] * I); rx_tmp.r = creal(out); rx_tmp.i = cimag(out);