From: PA3GSB <admin@pa3gsb.nl>
Date: Sat, 4 Feb 2017 10:45:41 +0000 (+0100)
Subject: rit added in radioberry protocol
X-Git-Url: https://git.rkrishnan.org/pf/components/install.html?a=commitdiff_plain;h=12b559000e57550f3765ede8e7220b24632d6dc0;p=pihpsdr.git

rit added in radioberry protocol
---

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);