Display error on unknown model capabilities instead of fail

This commit is contained in:
Mark Qvist 2024-03-28 12:05:30 +01:00
parent 589fcb8201
commit b977f33df6

View File

@ -774,18 +774,13 @@ class RNode():
self.made = bytes([self.eeprom[ROM.ADDR_MADE], self.eeprom[ROM.ADDR_MADE+1], self.eeprom[ROM.ADDR_MADE+2], self.eeprom[ROM.ADDR_MADE+3]]) self.made = bytes([self.eeprom[ROM.ADDR_MADE], self.eeprom[ROM.ADDR_MADE+1], self.eeprom[ROM.ADDR_MADE+2], self.eeprom[ROM.ADDR_MADE+3]])
self.checksum = b"" self.checksum = b""
self.min_freq = models[self.model][0]
self.max_freq = models[self.model][1]
self.max_output = models[self.model][2]
try: try:
self.min_freq = models[self.model][0] self.min_freq = models[self.model][0]
self.max_freq = models[self.model][1] self.max_freq = models[self.model][1]
self.max_output = models[self.model][2] self.max_output = models[self.model][2]
except Exception as e: except Exception as e:
RNS.log("Exception") RNS.log("Error: Model band and output power capabilities are unknown!")
RNS.log(str(e)) RNS.log("The contained exception was: "+str(e))
self.min_freq = 0 self.min_freq = 0
self.max_freq = 0 self.max_freq = 0
self.max_output = 0 self.max_output = 0