From 62091b28b01ebeeb59af0771d7331ef78dd918ad Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Wed, 2 Oct 2024 02:54:18 +0200 Subject: [PATCH] Fixed version comparison --- RNS/Interfaces/RNodeInterface.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/RNS/Interfaces/RNodeInterface.py b/RNS/Interfaces/RNodeInterface.py index 37ce509..24a53e2 100644 --- a/RNS/Interfaces/RNodeInterface.py +++ b/RNS/Interfaces/RNodeInterface.py @@ -491,9 +491,12 @@ class RNodeInterface(Interface): raise IOError("An IO error occurred while configuring radio state for "+str(self)) def validate_firmware(self): - if (self.maj_version >= RNodeInterface.REQUIRED_FW_VER_MAJ): - if (self.min_version >= RNodeInterface.REQUIRED_FW_VER_MIN): - self.firmware_ok = True + if (self.maj_version > RNodeInterface.REQUIRED_FW_VER_MAJ): + self.firmware_ok = True + else: + if (self.maj_version >= RNodeInterface.REQUIRED_FW_VER_MAJ): + if (self.min_version >= RNodeInterface.REQUIRED_FW_VER_MIN): + self.firmware_ok = True if self.firmware_ok: return