mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-05-17 05:42:55 -04:00
Implemented RNode interface driver
This commit is contained in:
parent
0ce144c760
commit
9bfb7ae2d7
6 changed files with 272 additions and 86 deletions
|
@ -33,9 +33,10 @@ class KISSInterface(Interface):
|
|||
stopbits = None
|
||||
serial = None
|
||||
|
||||
def __init__(self, owner, port, speed, databits, parity, stopbits, preamble, txtail, persistence, slottime):
|
||||
def __init__(self, owner, name, port, speed, databits, parity, stopbits, preamble, txtail, persistence, slottime):
|
||||
self.serial = None
|
||||
self.owner = owner
|
||||
self.name = name
|
||||
self.port = port
|
||||
self.speed = speed
|
||||
self.databits = databits
|
||||
|
@ -71,7 +72,7 @@ class KISSInterface(Interface):
|
|||
dsrdtr = False,
|
||||
)
|
||||
except Exception as e:
|
||||
RNS.log("Could not create serial port", RNS.LOG_ERROR)
|
||||
RNS.log("Could not open serial port "+self.port, RNS.LOG_ERROR)
|
||||
raise e
|
||||
|
||||
if self.serial.is_open:
|
||||
|
@ -88,7 +89,6 @@ class KISSInterface(Interface):
|
|||
self.setPersistence(self.persistence)
|
||||
self.setSlotTime(self.slottime)
|
||||
RNS.log("KISS interface configured")
|
||||
sleep(2)
|
||||
else:
|
||||
raise IOError("Could not open serial port")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue