]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
rit added in radioberry protocol
authorPA3GSB <admin@pa3gsb.nl>
Sat, 4 Feb 2017 10:45:41 +0000 (11:45 +0100)
committerPA3GSB <admin@pa3gsb.nl>
Sat, 4 Feb 2017 10:45:41 +0000 (11:45 +0100)
radioberry.c

index e5a736c7ed2269b564e1b50e7f495574b4b1e272..baa35162b5239e6b7fc7183fbb744bd6504265cf 100644 (file)
@@ -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);