Improved cleanup on device disconnect

This commit is contained in:
Mark Qvist 2022-11-02 20:44:09 +01:00
parent 63a59753af
commit f9b3c749e0
1 changed files with 3 additions and 0 deletions

View File

@ -1994,14 +1994,17 @@ def main():
if args.bluetooth_on: if args.bluetooth_on:
RNS.log("Enabling Bluetooth...") RNS.log("Enabling Bluetooth...")
rnode.enable_bluetooth() rnode.enable_bluetooth()
rnode.leave()
if args.bluetooth_off: if args.bluetooth_off:
RNS.log("Disabling Bluetooth...") RNS.log("Disabling Bluetooth...")
rnode.disable_bluetooth() rnode.disable_bluetooth()
rnode.leave()
if args.bluetooth_pair: if args.bluetooth_pair:
RNS.log("Putting device into Bluetooth pairing mode...") RNS.log("Putting device into Bluetooth pairing mode...")
rnode.bluetooth_pair() rnode.bluetooth_pair()
rnode.leave()
if args.info: if args.info:
if rnode.provisioned: if rnode.provisioned: