From 0d069bf1d886ec4a543298fc58fd41722573f8b8 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 27 May 2020 16:47:12 +0200 Subject: [PATCH] Fixed missing cr statement for RNodeInterface --- RNS/Interfaces/RNodeInterface.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index b11013a..793ec7d 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -68,7 +68,6 @@ class RNodeInterface(Interface): FREQ_MAX = 1020000000 RSSI_OFFSET = 157 - SNR_OFFSET = 128 CALLSIGN_MAX_LEN = 32 @@ -193,6 +192,7 @@ class RNodeInterface(Interface): self.setBandwidth() self.setTXPower() self.setSpreadingFactor() + self.setCodingRate() self.setRadioState(KISS.RADIO_STATE_ON) def setFrequency(self): @@ -221,7 +221,6 @@ class RNodeInterface(Interface): def setTXPower(self): txp = bytes([self.txpower]) - kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_TXPOWER])+txp+bytes([KISS.FEND]) written = self.serial.write(kiss_command) if written != len(kiss_command): @@ -229,7 +228,6 @@ class RNodeInterface(Interface): def setSpreadingFactor(self): sf = bytes([self.sf]) - kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_SF])+sf+bytes([KISS.FEND]) written = self.serial.write(kiss_command) if written != len(kiss_command): @@ -237,7 +235,6 @@ class RNodeInterface(Interface): def setCodingRate(self): cr = bytes([self.cr]) - kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_CR])+cr+bytes([KISS.FEND]) written = self.serial.write(kiss_command) if written != len(kiss_command):