#include <stdint.h>
#include "receiver.h"


Receiver::Receiver(
    uint8_t spiClockPin,
    uint8_t spiDataPin,
    uint8_t spiSelectPin
) {
    this->driver.init(spiClockPin, spiDataPin, spiSelectPin);
}


void Receiver::setFrequency(uint16_t frequency) {
    uint16_t fLo = (frequency - 479) / 2;
    uint16_t regN = fLo / 32;
    uint16_t regA = fLo % 32;
    uint16_t synthRegB = (regN << 7) | regA;

    this->driver.setSynthRegisterB(synthRegB);
}




#include <stdint.h>
#include "receiver.h"


Receiver::Receiver(
    uint8_t spiClockPin,
    uint8_t spiDataPin,
    uint8_t spiSelectPin
) {
    this->driver.init(spiClockPin, spiDataPin, spiSelectPin);
}


void Receiver::setFrequency(uint16_t frequency) {
    uint16_t flO = (frequency - 479) / 2;
    uint16_t regN = frequency / 32;
    uint16_t regA = frequency % 32;
    uint16_t synthRegB = (regN << 7) | regA;

    this->driver.setSynthRegisterB(synthRegB);
}




--- 
+++ 
@@ -12,9 +12,9 @@
 
 
 void Receiver::setFrequency(uint16_t frequency) {
-    uint16_t flO = (frequency - 479) / 2;
-    uint16_t regN = frequency / 32;
-    uint16_t regA = frequency % 32;
+    uint16_t fLo = (frequency - 479) / 2;
+    uint16_t regN = fLo / 32;
+    uint16_t regA = fLo % 32;
     uint16_t synthRegB = (regN << 7) | regA;
 
     this->driver.setSynthRegisterB(synthRegB);
Fix broken synth reg A gen
