From 3300541181e0dca306a92c413a818b460f793d61 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Tue, 2 May 2023 17:45:30 +0200 Subject: [PATCH] Fixed invalid error code in conditional. Fixes #284. --- RNS/Interfaces/Android/RNodeInterface.py | 2 +- RNS/Interfaces/RNodeInterface.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RNS/Interfaces/Android/RNodeInterface.py b/RNS/Interfaces/Android/RNodeInterface.py index 98cf225..fdfdc35 100644 --- a/RNS/Interfaces/Android/RNodeInterface.py +++ b/RNS/Interfaces/Android/RNodeInterface.py @@ -1003,7 +1003,7 @@ class RNodeInterface(Interface): if (byte == KISS.ERROR_INITRADIO): RNS.log(str(self)+" hardware initialisation error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR) raise IOError("Radio initialisation failure") - elif (byte == KISS.ERROR_INITRADIO): + elif (byte == KISS.ERROR_TXFAILED): RNS.log(str(self)+" hardware TX error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR) raise IOError("Hardware transmit failure") else: diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index 4977241..187cc2a 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -631,7 +631,7 @@ class RNodeInterface(Interface): if (byte == KISS.ERROR_INITRADIO): RNS.log(str(self)+" hardware initialisation error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR) raise IOError("Radio initialisation failure") - elif (byte == KISS.ERROR_INITRADIO): + elif (byte == KISS.ERROR_TXFAILED): RNS.log(str(self)+" hardware TX error (code "+RNS.hexrep(byte)+")", RNS.LOG_ERROR) raise IOError("Hardware transmit failure") else: