From b526e3554cc70428839ebc269338e30ddfdbd1f9 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Sat, 5 Oct 2024 17:05:02 +0200 Subject: [PATCH] Added low memory error decsription to RNodeInterface --- RNS/Interfaces/RNodeInterface.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index 24a53e2..40ae5bb 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -78,6 +78,8 @@ class KISS(): ERROR_INITRADIO = 0x01 ERROR_TXFAILED = 0x02 ERROR_EEPROM_LOCKED = 0x03 + ERROR_QUEUE_FULL = 0x04 + ERROR_MEMORY_LOW = 0x05 PLATFORM_AVR = 0x90 PLATFORM_ESP32 = 0x80 @@ -844,6 +846,9 @@ class RNodeInterface(Interface): elif (byte == KISS.ERROR_TXFAILED): RNS.log(str(self)+" hardware TX error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR) raise IOError("Hardware transmit failure") + elif (byte == KISS.ERROR_MEMORY_LOW): + 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"}) else: RNS.log(str(self)+" hardware error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR) raise IOError("Unknown hardware failure")