From d64064691ad78d3c863138b9ab16e8232ecc2090 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Wed, 4 Sep 2024 11:52:41 +0100 Subject: [PATCH 1/2] Allow for use of display by master on NRF52 --- RNS/Interfaces/RNodeInterface.py | 3 ++- RNS/Interfaces/RNodeMultiInterface.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index 00c97a4..87ac6d2 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -80,6 +80,7 @@ class KISS(): PLATFORM_AVR = 0x90 PLATFORM_ESP32 = 0x80 + PLATFORM_NRF52 = 0x70 @staticmethod def escape(data): @@ -285,7 +286,7 @@ class RNodeInterface(Interface): RNS.log("Could not detect device for "+str(self), RNS.LOG_ERROR) self.serial.close() else: - if self.platform == KISS.PLATFORM_ESP32: + if self.platform == KISS.PLATFORM_ESP32 or self.platform == KISS.PLATFORM_NRF52: self.display = True RNS.log("Serial port "+self.port+" is now open") diff --git a/RNS/Interfaces/RNodeMultiInterface.py b/RNS/Interfaces/RNodeMultiInterface.py index e7598a1..bbf5b4b 100644 --- a/RNS/Interfaces/RNodeMultiInterface.py +++ b/RNS/Interfaces/RNodeMultiInterface.py @@ -106,6 +106,7 @@ class KISS(): PLATFORM_AVR = 0x90 PLATFORM_ESP32 = 0x80 + PLATFORM_NRF52 = 0x70 SX127X = 0x00 SX1276 = 0x01 @@ -295,7 +296,7 @@ class RNodeMultiInterface(Interface): RNS.log("Could not detect device for "+str(self), RNS.LOG_ERROR) self.serial.close() else: - if self.platform == KISS.PLATFORM_ESP32: + if self.platform == KISS.PLATFORM_ESP32 or self.platform == KISS.PLATFORM_NRF52: self.display = True RNS.log("Serial port "+self.port+" is now open") From 9d744e231795386ed70396ab5969f6846e0fbf26 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Wed, 4 Sep 2024 11:54:32 +0100 Subject: [PATCH 2/2] Allow for display use by master on NRF52 on Android --- RNS/Interfaces/Android/RNodeInterface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RNS/Interfaces/Android/RNodeInterface.py b/RNS/Interfaces/Android/RNodeInterface.py index df3db02..9d6ecb2 100644 --- a/RNS/Interfaces/Android/RNodeInterface.py +++ b/RNS/Interfaces/Android/RNodeInterface.py @@ -81,6 +81,7 @@ class KISS(): PLATFORM_AVR = 0x90 PLATFORM_ESP32 = 0x80 + PLATFORM_NRF52 = 0x70 @staticmethod def escape(data): @@ -595,7 +596,7 @@ class RNodeInterface(Interface): if not self.detected: raise IOError("Could not detect device") else: - if self.platform == KISS.PLATFORM_ESP32: + if self.platform == KISS.PLATFORM_ESP32 or self.platform == KISS.PLATFORM_NRF52: self.display = True if not self.firmware_ok: