Porównaj commity

...

4 Commity

Autor SHA1 Wiadomość Data
Mark Qvist b977f33df6 Display error on unknown model capabilities instead of fail 2024-03-28 12:05:30 +01:00
Mark Qvist 589fcb8201 Added custom EEPROM bootstrap to rnodeconf 2024-03-28 00:04:48 +01:00
Mark Qvist e5427d70ac Added custom EEPROM bootstrap to rnodeconf 2024-03-27 21:48:32 +01:00
Mark Qvist 2f5381b307 Added TCXO model code comment 2024-03-24 11:51:44 +01:00
1 zmienionych plików z 13 dodań i 11 usunięć

Wyświetl plik

@ -149,8 +149,9 @@ class ROM():
PRODUCT_T32_21 = 0xB1
MODEL_B4 = 0xB4
MODEL_B9 = 0xB9
MODEL_B4_TCXO = 0x04
MODEL_B9_TCXO = 0x09
MODEL_B4_TCXO = 0x04 # The TCXO model codes are only used here to select the
MODEL_B9_TCXO = 0x09 # correct firmware, actual model codes in firmware is
# still 0xB4 and 0xB9.
PRODUCT_H32_V2 = 0xC0
MODEL_C4 = 0xC4
@ -773,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.checksum = b""
self.min_freq = models[self.model][0]
self.max_freq = models[self.model][1]
self.max_output = models[self.model][2]
try:
self.min_freq = models[self.model][0]
self.max_freq = models[self.model][1]
self.max_output = models[self.model][2]
except Exception as e:
RNS.log("Exception")
RNS.log(str(e))
RNS.log("Error: Model band and output power capabilities are unknown!")
RNS.log("The contained exception was: "+str(e))
self.min_freq = 0
self.max_freq = 0
self.max_output = 0
@ -3040,10 +3036,13 @@ def main():
if args.product != None:
if args.product == "03":
mapped_product = ROM.PRODUCT_RNODE
if args.product == "f0":
elif args.product == "f0":
mapped_product = ROM.PRODUCT_HMBRW
if args.product == "e0":
elif args.product == "e0":
mapped_product = ROM.PRODUCT_TBEAM
else:
if len(args.product) == 2:
mapped_product = ord(bytes.fromhex(args.product))
if mapped_model != None:
if mapped_model == ROM.MODEL_B4_TCXO:
@ -3067,6 +3066,9 @@ def main():
model = ROM.MODEL_E9
elif args.model == "ff":
model = ROM.MODEL_FF
else:
if len(args.model) == 2:
model = ord(bytes.fromhex(args.model))
if args.hwrev != None and (args.hwrev > 0 and args.hwrev < 256):