Add extra 2.4GHz channel and fix config errors

This commit is contained in:
jacob.eva 2024-09-20 11:01:37 +01:00
parent 3cb935f01b
commit 4e47975e4c
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E
2 changed files with 14 additions and 13 deletions

View File

@ -4315,15 +4315,15 @@ class SidebandApp(MDApp):
self.hardware_rnode_secondary_modem_toggle_action(override=True)
self.sideband.config["hw_rnode_sec_channel_index"] = config["ws"]
self.sideband.config["hw_rnode_sec_preset_index"] = config["qs"]
self.hardware_rnode_screen.ids.hardware_rnode_channel.text = list(self.sideband.config["hw_rnode_sec_channels"].keys())[self.sideband.config["hw_rnode_sec_channel_index"]]
self.hardware_rnode_screen.ids.hardware_rnode_preset.text = self.sideband.config["hw_rnode_presets"][self.sideband.config["hw_rnode_sec_preset_index"]]
self.hardware_rnode_screen.ids.hardware_rnode_frequency.text = str(config["fs"]/1000000.0)
self.hardware_rnode_screen.ids.hardware_rnode_bandwidth.text = str(config["bs"]/1000.0)
self.hardware_rnode_screen.ids.hardware_rnode_txpower.text = str(config["ts"])
self.hardware_rnode_screen.ids.hardware_rnode_spreadingfactor.text = str(config["ss"])
self.hardware_rnode_screen.ids.hardware_rnode_codingrate.text = str(config["cs"])
self.hardware_rnode_screen.ids.hardware_rnode_atl_short.text = str(config["ks"])
self.hardware_rnode_screen.ids.hardware_rnode_atl_long.text = str(config["ms"])
self.hardware_rnode_screen.ids.hardware_rnode_sec_channel.text = list(self.sideband.config["hw_rnode_sec_channels"].keys())[self.sideband.config["hw_rnode_sec_channel_index"]]
self.hardware_rnode_screen.ids.hardware_rnode_sec_preset.text = self.sideband.config["hw_rnode_presets"][self.sideband.config["hw_rnode_sec_preset_index"]]
self.hardware_rnode_screen.ids.hardware_rnode_sec_frequency.text = str(config["fs"]/1000000.0)
self.hardware_rnode_screen.ids.hardware_rnode_sec_bandwidth.text = str(config["bs"]/1000.0)
self.hardware_rnode_screen.ids.hardware_rnode_sec_txpower.text = str(config["ts"])
self.hardware_rnode_screen.ids.hardware_rnode_sec_spreadingfactor.text = str(config["ss"])
self.hardware_rnode_screen.ids.hardware_rnode_sec_codingrate.text = str(config["cs"])
self.hardware_rnode_screen.ids.hardware_rnode_sec_atl_short.text = str(config["ks"])
self.hardware_rnode_screen.ids.hardware_rnode_sec_atl_long.text = str(config["ms"])
else:
self.hardware_rnode_secondary_modem_toggle_action()

View File

@ -449,6 +449,7 @@ class SidebandCore():
"Channel 2": 2402.8125, # MHz
"Channel 3": 2404.8125, # MHz
"Channel 4": 2406.8125, # MHz
"Channel 5": 2408.8125, # MHz
}
channel_keys = sorted(self.config["hw_rnode_sec_channels"].keys())
self.config["hw_rnode_sec_channel_index"] = 0
@ -456,10 +457,10 @@ class SidebandCore():
self.config["hw_rnode_sec_frequency"] = self.config["hw_rnode_sec_channels"]["Channel 1"] * 1000000
self.config["hw_rnode_sec_modulation"] = "LoRa"
self.config["hw_rnode_sec_preset_index"] = 0
self.config["hw_rnode_sec_bandwidth"] = self.config["hw_rnode_presets_cfg"][0][0]
self.config["hw_rnode_sec_spreading_factor"] = self.config["hw_rnode_presets_cfg"][0][1]
self.config["hw_rnode_sec_coding_rate"] = self.config["hw_rnode_presets_cfg"][0][2]
self.config["hw_rnode_tx_power"] = 5
self.config["hw_rnode_sec_bandwidth"] = self.config["hw_rnode_sec_presets_cfg"][0][0]
self.config["hw_rnode_sec_spreading_factor"] = self.config["hw_rnode_sec_presets_cfg"][0][1]
self.config["hw_rnode_sec_coding_rate"] = self.config["hw_rnode_sec_presets_cfg"][0][2]
self.config["hw_rnode_sec_tx_power"] = 5
self.config["hw_rnode_beaconinterval"] = None
self.config["hw_rnode_beacondata"] = None
self.config["hw_rnode_bt_device"] = None