mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-30 01:00:18 +00:00
Compare commits
No commits in common. "d26bbbd59f3811ab1102b1746241a4298d4ce950" and "d5e0a461cf16a22d11cb66c27d4272ac34bc4154" have entirely different histories.
d26bbbd59f
...
d5e0a461cf
@ -254,14 +254,13 @@ class RNodeInterface(Interface):
|
|||||||
|
|
||||||
# Driver overrides for speficic chips
|
# Driver overrides for speficic chips
|
||||||
from usbserial4a import serial4a as pyserial
|
from usbserial4a import serial4a as pyserial
|
||||||
proxy = pyserial.get_serial_port
|
|
||||||
if vid == 0x1A86 and pid == 0x55D4:
|
if vid == 0x1A86 and pid == 0x55D4:
|
||||||
# Force CDC driver for Qinheng CH34x
|
# Force CDC driver for Qinheng CH34x
|
||||||
RNS.log("Using CDC driver for "+RNS.hexrep(vid)+":"+RNS.hexrep(pid), RNS.LOG_DEBUG)
|
RNS.log("Using CDC driver for "+RNS.hexrep(vid)+":"+RNS.hexrep(pid), RNS.LOG_DEBUG)
|
||||||
from usbserial4a.cdcacmserial4a import CdcAcmSerial
|
from usbserial4a.cdcacmserial4a import CdcAcmSerial
|
||||||
proxy = CdcAcmSerial
|
proxy = CdcAcmSerial
|
||||||
|
|
||||||
serial = proxy(
|
serial = pyserial.get_serial_port(
|
||||||
port,
|
port,
|
||||||
baudrate = 115200,
|
baudrate = 115200,
|
||||||
bytesize = 8,
|
bytesize = 8,
|
||||||
@ -555,7 +554,7 @@ class RNodeInterface(Interface):
|
|||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
self.detect()
|
self.detect()
|
||||||
sleep(0.5)
|
sleep(0.4)
|
||||||
|
|
||||||
if not self.detected:
|
if not self.detected:
|
||||||
raise IOError("Could not detect device")
|
raise IOError("Could not detect device")
|
||||||
@ -593,22 +592,22 @@ class RNodeInterface(Interface):
|
|||||||
|
|
||||||
def initRadio(self):
|
def initRadio(self):
|
||||||
self.setFrequency()
|
self.setFrequency()
|
||||||
time.sleep(0.15)
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.setBandwidth()
|
self.setBandwidth()
|
||||||
time.sleep(0.15)
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.setTXPower()
|
self.setTXPower()
|
||||||
time.sleep(0.15)
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.setSpreadingFactor()
|
self.setSpreadingFactor()
|
||||||
time.sleep(0.15)
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.setCodingRate()
|
self.setCodingRate()
|
||||||
time.sleep(0.15)
|
time.sleep(0.1)
|
||||||
|
|
||||||
self.setRadioState(KISS.RADIO_STATE_ON)
|
self.setRadioState(KISS.RADIO_STATE_ON)
|
||||||
time.sleep(0.15)
|
time.sleep(0.1)
|
||||||
|
|
||||||
def detect(self):
|
def detect(self):
|
||||||
kiss_command = bytes([KISS.FEND, KISS.CMD_DETECT, KISS.DETECT_REQ, KISS.FEND, KISS.CMD_FW_VERSION, 0x00, KISS.FEND, KISS.CMD_PLATFORM, 0x00, KISS.FEND, KISS.CMD_MCU, 0x00, KISS.FEND])
|
kiss_command = bytes([KISS.FEND, KISS.CMD_DETECT, KISS.DETECT_REQ, KISS.FEND, KISS.CMD_FW_VERSION, 0x00, KISS.FEND, KISS.CMD_PLATFORM, 0x00, KISS.FEND, KISS.CMD_MCU, 0x00, KISS.FEND])
|
||||||
|
Loading…
Reference in New Issue
Block a user