-
Notifications
You must be signed in to change notification settings - Fork 14
lab.py communication with brickman
The protocol between brickman (the UI on ev3dev) and lab.py (the service in the background) has some usability issues (see #30). Below we document the status quo and discuss some options to move forward.
What is the issue? We're returning the code to the 'brickman ui', before we know that the 'connector thread' has successfully connected to the server and registered.
This works, but uncovers another issue in the protocol. There is time-window between 'pressing connect' and 'showing the code'. If the user manages to press connect again, it will trigger another dbus call that tries to connect. Before this was hard, since after pressing connect, we got the pairing code coming up almost immediately. If we press 'back' in the pairing code screen and connect again, we'd cancel any inflight connection attempt and run a new one. We should fix this by making the connect-button insensitive right after we call on_server_connect and make it sensitive again when we close the pairing code view.
Now an remaining issue is that we are leaving the user in the dark about, what is going on between 'pressing connect' and the pairing dialog showing up. Ideally we can bring the pairing dialog up right away, but show 'connecting ...' and replace it with the code when we are connected.
Also for the cases we're still running the old UI, we need to at least handle when people press connect multiple times. TODO: needs testing_
Now we have the brickman package on ev3dev which is probably not going to get updates for jessie. We need to figure out what changes we can make so that modified/unmodified versions of brickman/robertalab won't get worse.
Brickman UI | RobertabLab (this) | Description |
---|---|---|
old | old | #30 |
new | old | we might briefly flash the 'connecting ...' text |
old | new | connect can be presses multiple times |
new | new | all good |