From 12b559000e57550f3765ede8e7220b24632d6dc0 Mon Sep 17 00:00:00 2001 From: PA3GSB Date: Sat, 4 Feb 2017 11:45:41 +0100 Subject: [PATCH] rit added in radioberry protocol --- radioberry.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/radioberry.c b/radioberry.c index e5a736c..baa3516 100644 --- a/radioberry.c +++ b/radioberry.c @@ -417,12 +417,14 @@ void spiReader() { // wait till rxFIFO buffer is filled with at least one element while ( gpioRead(13) == 1) {}; + long long rxFrequency=ddsFrequency+(long long)rit; + iqdata[0] = (sampleSpeed & 0x03); iqdata[1] = (((rx_random << 6) & 0x40) | ((rx_dither <<5) & 0x20) | (attenuation & 0x1F)); - iqdata[2] = ((ddsFrequency >> 24) & 0xFF); - iqdata[3] = ((ddsFrequency >> 16) & 0xFF); - iqdata[4] = ((ddsFrequency >> 8) & 0xFF); - iqdata[5] = (ddsFrequency & 0xFF); + iqdata[2] = ((rxFrequency >> 24) & 0xFF); + iqdata[3] = ((rxFrequency >> 16) & 0xFF); + iqdata[4] = ((rxFrequency >> 8) & 0xFF); + iqdata[5] = (rxFrequency & 0xFF); spiXfer(h, iqdata, iqdata, 6); -- 2.45.2