mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-25 07:00:17 +00:00
Added error descriptions for modem communication timeout
This commit is contained in:
parent
c5687f190b
commit
a0d61f6441
@ -89,6 +89,7 @@ class KISS():
|
|||||||
ERROR_EEPROM_LOCKED = 0x03
|
ERROR_EEPROM_LOCKED = 0x03
|
||||||
ERROR_QUEUE_FULL = 0x04
|
ERROR_QUEUE_FULL = 0x04
|
||||||
ERROR_MEMORY_LOW = 0x05
|
ERROR_MEMORY_LOW = 0x05
|
||||||
|
ERROR_MODEM_TIMEOUT = 0x06
|
||||||
ERROR_INVALID_FIRMWARE = 0x10
|
ERROR_INVALID_FIRMWARE = 0x10
|
||||||
ERROR_INVALID_BLE_MTU = 0x20
|
ERROR_INVALID_BLE_MTU = 0x20
|
||||||
|
|
||||||
@ -1254,6 +1255,9 @@ class RNodeInterface(Interface):
|
|||||||
elif (byte == KISS.ERROR_MEMORY_LOW):
|
elif (byte == KISS.ERROR_MEMORY_LOW):
|
||||||
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+"): Memory exhausted", RNS.LOG_ERROR)
|
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+"): Memory exhausted", RNS.LOG_ERROR)
|
||||||
self.hw_errors.append({"error": KISS.ERROR_MEMORY_LOW, "description": "Memory exhausted on connected device"})
|
self.hw_errors.append({"error": KISS.ERROR_MEMORY_LOW, "description": "Memory exhausted on connected device"})
|
||||||
|
elif (byte == KISS.ERROR_MODEM_TIMEOUT):
|
||||||
|
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+"): Modem communication timed out", RNS.LOG_ERROR)
|
||||||
|
self.hw_errors.append({"error": KISS.ERROR_MODEM_TIMEOUT, "description": "Modem communication timed out on connected device"})
|
||||||
else:
|
else:
|
||||||
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR)
|
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR)
|
||||||
raise IOError("Unknown hardware failure")
|
raise IOError("Unknown hardware failure")
|
||||||
|
@ -80,6 +80,7 @@ class KISS():
|
|||||||
ERROR_EEPROM_LOCKED = 0x03
|
ERROR_EEPROM_LOCKED = 0x03
|
||||||
ERROR_QUEUE_FULL = 0x04
|
ERROR_QUEUE_FULL = 0x04
|
||||||
ERROR_MEMORY_LOW = 0x05
|
ERROR_MEMORY_LOW = 0x05
|
||||||
|
ERROR_MODEM_TIMEOUT = 0x06
|
||||||
|
|
||||||
PLATFORM_AVR = 0x90
|
PLATFORM_AVR = 0x90
|
||||||
PLATFORM_ESP32 = 0x80
|
PLATFORM_ESP32 = 0x80
|
||||||
@ -850,6 +851,9 @@ class RNodeInterface(Interface):
|
|||||||
elif (byte == KISS.ERROR_MEMORY_LOW):
|
elif (byte == KISS.ERROR_MEMORY_LOW):
|
||||||
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+"): Memory exhausted", RNS.LOG_ERROR)
|
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+"): Memory exhausted", RNS.LOG_ERROR)
|
||||||
self.hw_errors.append({"error": KISS.ERROR_MEMORY_LOW, "description": "Memory exhausted on connected device"})
|
self.hw_errors.append({"error": KISS.ERROR_MEMORY_LOW, "description": "Memory exhausted on connected device"})
|
||||||
|
elif (byte == KISS.ERROR_MODEM_TIMEOUT):
|
||||||
|
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+"): Modem communication timed out", RNS.LOG_ERROR)
|
||||||
|
self.hw_errors.append({"error": KISS.ERROR_MODEM_TIMEOUT, "description": "Modem communication timed out on connected device"})
|
||||||
else:
|
else:
|
||||||
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR)
|
RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR)
|
||||||
raise IOError("Unknown hardware failure")
|
raise IOError("Unknown hardware failure")
|
||||||
|
Loading…
Reference in New Issue
Block a user