From 4aada31b21e4b4e63a77e047b7097cd34a1c240c Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Tue, 8 Oct 2024 15:12:30 -0400 Subject: [PATCH] ui: augment pairing message for devices with multiple channels --- lib/solaar/cli/pair.py | 4 +++- lib/solaar/ui/pair_window.py | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/solaar/cli/pair.py b/lib/solaar/cli/pair.py index 17043df6..16aa9858 100644 --- a/lib/solaar/cli/pair.py +++ b/lib/solaar/cli/pair.py @@ -109,7 +109,9 @@ def run(receivers, args, find_receiver, _ignore): else: receiver.set_lock(False, timeout=timeout) - print("Pairing: turn your new device on (timing out in", timeout, "seconds).") + print("Pairing: Turn your device on or press, hold, and release") + print("a channel button or the channel switch button.") + print("Timing out in", timeout, "seconds.") pairing_start = time() patience = 5 # the lock-open notification may come slightly later, wait for it a bit while receiver.pairing.lock_open or time() - pairing_start < patience: diff --git a/lib/solaar/ui/pair_window.py b/lib/solaar/ui/pair_window.py index 656c2052..03bd6603 100644 --- a/lib/solaar/ui/pair_window.py +++ b/lib/solaar/ui/pair_window.py @@ -45,10 +45,20 @@ def create(receiver): else: text = _("Other receivers are only compatible with a few devices.") text += "\n\n" - text += _("Turn on the device you want to pair.") + text += _("For most devices, turn on the device you want to pair.") + text += _("If the device is already turned on, turn it off and on again.") + text += "\n" text += _("The device must not be paired with a nearby powered-on receiver.") text += "\n" - text += _("If the device is already turned on, turn it off and on again.") + text += _( + "For devices with multiple channels, " + "press, hold, and release the button for the channel you wish to pair" + "\n" + "or use the channel switch button to select a channel " + "and then press, hold, and release the channel switch button." + ) + text += "\n" + text += _("The channel indicator light should be blinking rapidly.") if receiver.remaining_pairings() and receiver.remaining_pairings() >= 0: text += ( ngettext(