mirror of
https://github.com/liberatedsystems/openCom-Companion.git
synced 2024-12-27 20:48:39 +01:00
Force BLE by default
This commit is contained in:
parent
d639ffcf9a
commit
fc09ac1cf7
@ -4096,14 +4096,14 @@ class SidebandApp(MDApp):
|
||||
|
||||
self.sideband.save_configuration()
|
||||
|
||||
def hardware_rnode_ble_toggle_action(self, sender=None, event=None):
|
||||
if sender.active:
|
||||
self.sideband.config["hw_rnode_ble"] = True
|
||||
self.request_bluetooth_permissions()
|
||||
else:
|
||||
self.sideband.config["hw_rnode_ble"] = False
|
||||
#def hardware_rnode_ble_toggle_action(self, sender=None, event=None):
|
||||
# if sender.active:
|
||||
# self.sideband.config["hw_rnode_ble"] = True
|
||||
# self.request_bluetooth_permissions()
|
||||
# else:
|
||||
# self.sideband.config["hw_rnode_ble"] = False
|
||||
|
||||
self.sideband.save_configuration()
|
||||
# self.sideband.save_configuration()
|
||||
|
||||
def hardware_rnode_framebuffer_toggle_action(self, sender=None, event=None):
|
||||
if sender.active:
|
||||
@ -4210,7 +4210,7 @@ class SidebandApp(MDApp):
|
||||
t_btd = ""
|
||||
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_bluetooth.active = self.sideband.config["hw_rnode_bluetooth"]
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_ble.active = self.sideband.config["hw_rnode_ble"]
|
||||
#self.hardware_rnode_screen.ids.hardware_rnode_ble.active = self.sideband.config["hw_rnode_ble"]
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_framebuffer.active = self.sideband.config["hw_rnode_enable_framebuffer"]
|
||||
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_advanced_cfg.active = self.sideband.config["hw_rnode_advanced_cfg"]
|
||||
@ -4277,7 +4277,7 @@ class SidebandApp(MDApp):
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_beaconinterval.bind(on_text_validate=save_connectivity)
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_beacondata.bind(on_text_validate=save_connectivity)
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_bluetooth.bind(active=self.hardware_rnode_bt_toggle_action)
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_ble.bind(active=self.hardware_rnode_ble_toggle_action)
|
||||
#self.hardware_rnode_screen.ids.hardware_rnode_ble.bind(active=self.hardware_rnode_ble_toggle_action)
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_framebuffer.bind(active=self.hardware_rnode_framebuffer_toggle_action)
|
||||
|
||||
self.hardware_rnode_screen.ids.hardware_rnode_advanced_cfg.bind(active=self.hardware_rnode_advanced_cfg_toggle_action)
|
||||
|
@ -3542,7 +3542,6 @@ class SidebandCore():
|
||||
if self.config["hw_rnode_bluetooth"]:
|
||||
RNS.log("Allowing RNode bluetooth", RNS.LOG_DEBUG)
|
||||
rnode_allow_bluetooth = True
|
||||
ble_dispatcher = RNS.Interfaces.Android.RNodeMultiInterface.AndroidBLEDispatcher()
|
||||
if self.config["hw_rnode_bt_device"] != None:
|
||||
bt_device_name = self.config["hw_rnode_bt_device"]
|
||||
|
||||
@ -3617,8 +3616,9 @@ class SidebandCore():
|
||||
"RNodeInterface",
|
||||
target_port,
|
||||
subint_config,
|
||||
ble_dispatcher = ble_dispatcher,
|
||||
allow_bluetooth = rnode_allow_bluetooth,
|
||||
allow_bluetooth = False,
|
||||
force_ble = rnode_allow_bluetooth,
|
||||
ble_name = bt_device_name,
|
||||
target_device_name = bt_device_name,
|
||||
)
|
||||
|
||||
@ -3636,8 +3636,9 @@ class SidebandCore():
|
||||
flow_control = None,
|
||||
id_interval = self.config["hw_rnode_beaconinterval"],
|
||||
id_callsign = self.config["hw_rnode_beacondata"],
|
||||
allow_bluetooth = rnode_allow_bluetooth,
|
||||
target_device_name = bt_device_name,
|
||||
allow_bluetooth = False,
|
||||
force_ble = rnode_allow_bluetooth,
|
||||
ble_name = bt_device_name,
|
||||
st_alock = atl_short,
|
||||
lt_alock = atl_long,
|
||||
)
|
||||
|
@ -2603,21 +2603,6 @@ MDScreen:
|
||||
pos_hint: {"center_y": 0.3}
|
||||
active: False
|
||||
|
||||
MDBoxLayout:
|
||||
orientation: "horizontal"
|
||||
size_hint_y: None
|
||||
padding: [0,0,dp(24),dp(0)]
|
||||
height: dp(48)
|
||||
|
||||
MDLabel:
|
||||
text: "Device requires BLE"
|
||||
font_style: "H6"
|
||||
|
||||
MDSwitch:
|
||||
id: hardware_rnode_ble
|
||||
pos_hint: {"center_y": 0.3}
|
||||
active: False
|
||||
|
||||
MDLabel:
|
||||
id: hardware_rnode_info
|
||||
markup: True
|
||||
|
Loading…
Reference in New Issue
Block a user