Skip to content

Commit

Permalink
disconnect inactive hubs, emergency stop if hub becomes active
Browse files Browse the repository at this point in the history
  • Loading branch information
Novakasa committed Nov 18, 2023
1 parent 648d14c commit b346051
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions brickrail-gui/ble/ble_hub.gd
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@ func set_responsiveness(val):
func set_active(p_active):
active = p_active
emit_signal("active_changed", p_active)
emit_signal("state_changed")

if not active:
if running:
yield(stop_program_coroutine(), "completed")
if connected:
yield(disconnect_coroutine(), "completed")

func set_name(p_new_name):
var old_name = name
Expand Down

0 comments on commit b346051

Please sign in to comment.