mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
slop board
This commit is contained in:
@@ -522,11 +522,17 @@ void commissioning_loop(PairingSharedState* shared) {
|
|||||||
// time and then queried a second client, making successful discovery depend
|
// time and then queried a second client, making successful discovery depend
|
||||||
// on when the physical button happened to be pressed.
|
// on when the physical button happened to be pressed.
|
||||||
// BlueZ's command-line client exits after the SetDiscoveryFilter callback
|
// BlueZ's command-line client exits after the SetDiscoveryFilter callback
|
||||||
// unless non-interactive mode has a timeout. A one-day timeout keeps the
|
// unless non-interactive mode has a timeout. Its explicit monitor mode is
|
||||||
// client alive for unattended commissioning; the worker normally stops it
|
// equally important here: stdout is a worker-owned pipe rather than a
|
||||||
// itself as soon as the board appears and restarts it if the day expires.
|
// terminal, and current bluetoothctl versions otherwise report command
|
||||||
|
// acknowledgements such as `Discovery started` without forwarding the
|
||||||
|
// asynchronous `[NEW]` and `[CHG]` device lines parsed below. A one-day
|
||||||
|
// timeout keeps that monitored client alive for unattended commissioning;
|
||||||
|
// the worker normally stops it itself as soon as the board appears and
|
||||||
|
// restarts it if the day expires.
|
||||||
RunningCommand discovery = start_command({
|
RunningCommand discovery = start_command({
|
||||||
"bluetoothctl", "--timeout", kDiscoveryTimeoutSeconds, "scan", "bredr"});
|
"bluetoothctl", "--monitor", "--timeout", kDiscoveryTimeoutSeconds,
|
||||||
|
"scan", "bredr"});
|
||||||
if (discovery.pid < 0) {
|
if (discovery.pid < 0) {
|
||||||
emit_status("error", "", "could not start Bluetooth discovery: " +
|
emit_status("error", "", "could not start Bluetooth discovery: " +
|
||||||
command_error_summary(discovery.transcript, "unknown process error"));
|
command_error_summary(discovery.transcript, "unknown process error"));
|
||||||
|
|||||||
Reference in New Issue
Block a user