Fix index error

This commit is contained in:
jacob.eva 2024-09-16 18:28:42 +01:00
parent 144d317702
commit 4bcab64dcc
No known key found for this signature in database
GPG Key ID: 0B92E083BBCCAA1E

View File

@ -3831,7 +3831,7 @@ class SidebandApp(MDApp):
primary_modem = True primary_modem = True
elif caller == self.hardware_rnode_screen.ids.hardware_rnode_preset_next: elif caller == self.hardware_rnode_screen.ids.hardware_rnode_preset_next:
self.sideband.config.hw_rnode_preset_index += 1 self.sideband.config["hw_rnode_preset_index"] += 1
if self.sideband.config["hw_rnode_preset_index"] >= len(self.sideband.config["hw_rnode_channels"].keys()): if self.sideband.config["hw_rnode_preset_index"] >= len(self.sideband.config["hw_rnode_channels"].keys()):
self.sideband.config["hw_rnode_preset_index"] = len(self.sideband.config["hw_rnode_channels"].keys()) - 1 self.sideband.config["hw_rnode_preset_index"] = len(self.sideband.config["hw_rnode_channels"].keys()) - 1
preset = self.sideband.config["hw_rnode_presets"][self.sideband.config["hw_rnode_preset_index"]] preset = self.sideband.config["hw_rnode_presets"][self.sideband.config["hw_rnode_preset_index"]]