Commit Graph

62 Commits

Author SHA1 Message Date
Filipe Laíns 27c90fa736 yapf: adjust style to not indent closing brackets
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 8e89aa0038 yapf: set max line lenght to 127
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 627185079f flake8: initial fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 33521558ed pre-commit: initial fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns e6369e0c3c isort: intial import fix
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Filipe Laíns 72a8d311bc yapf: change code style to yapf
Signed-off-by: Filipe Laíns <lains@archlinux.org>
2020-07-07 15:11:15 +01:00
Peter F. Patel-Schneider e69c4c6b4f receiver: don't abort on unexpected device number, just warn 2020-06-21 12:16:04 -04:00
Peter F. Patel-Schneider b7e8e646b5 ui: don't complain for receivers in other seats 2020-05-17 11:55:01 -04:00
Peter F. Patel-Schneider 23c0397764 listener: mark device as inactive after resume so that settings are correctly pushed 2020-02-22 08:46:56 -05:00
Peter F. Patel-Schneider 4c46a999f7 gui: treat nano protocol disconnections correctly when pairing 2020-02-17 08:34:53 +00:00
Peter F. Patel-Schneider dc2a1adf26 ui: handle re-pairing receivers correctly when pairing 2020-02-17 08:34:53 +00:00
Peter F. Patel-Schneider 515f994ab8 receiver: ignore disconnects of disconnected devices 2020-02-16 22:16:37 +00:00
Ben Wolsieffer a59368f3e7 Fix issues with HID++ >= 2.0 devices (particularly related to sleep).
* Don't assume 0x41 messages only occur when a device is first paired
    (prevents errors when waking from sleep or turning a device on)
  * Delay reads/writes when a device is powered on, to prevent broken pipe
    errors (hacky solution).
  * Don't clear status when a device connects, preventing settings from being
    cleared when a device sleeps or is turned off.
  * Fix typos.
2018-08-10 23:15:37 -04:00
Mauro Carvalho Chehab a4b7194490 listener: fix device registration logic
The "already_known" var actually doesn't track if the device was
already registered or not.

That causes race issues at Solaar, causing it to sometimes not
detect a device.

Change the logic to always call register_new_device if the
corresponding events happen, and updating already_known
to reflect it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-09-11 10:34:23 -03:00
Daniel Pavel 69febfcea5 don't rely on upower to check devices after wake-up (#111)
still use upower resume events to ping devices, just in case
the old behaviour is available with a command-line option
2013-08-12 15:22:34 +02:00
Daniel Pavel 5d4d0c07ad use () instead of [] where possible 2013-07-19 11:48:40 +02:00
Daniel Pavel 38c76393b1 added copyright notices to all source files 2013-07-15 17:54:42 +02:00
Daniel Pavel ce9b10dc2d started i18n support 2013-07-15 17:16:44 +02:00
Daniel Pavel 43ab629a26 moved logitech.unifying_receiver package to logitech_receiver 2013-07-12 22:48:09 +02:00
Daniel Pavel 39534d11dd make sure all debug and info loggings are if-guarded 2013-07-07 17:18:42 +02:00
Daniel Pavel 508444526a commented-out the poll-ticking feature
not useful right now, and less code to worry about
2013-07-06 14:23:56 +02:00
Daniel Pavel bd3198f6f0 correctly handle out-of-process pairing and unpairing 2013-07-05 16:06:38 +02:00
Daniel Pavel a03cc9ce64 more chair switching -- moved notifications handling into own .py 2013-07-03 08:21:40 +02:00
Daniel Pavel b1e9480f5a minor logging tweaks 2013-07-01 15:00:21 +02:00
Daniel Pavel 8d5718178f load the configuration when the device is detected
and apply it every time the device comes online
2013-06-29 20:35:02 +02:00
Daniel Pavel 375db9996f fixed reading correct device kind on link notification 2013-06-24 16:58:41 +02:00
Daniel Pavel cec892ce88 disable poll ticking
It was necessary to periodically check if the peripherals are still
online -- suspend/resume may cause Solaar to (wrongfully) remember the
status of devices after a resume.

Now that is handled by the optional upower module -- the hard way -- by
restarting all listeners on resume.
2013-06-23 18:15:19 +02:00
Daniel Pavel d5374b9f51 optionally listen for upower suspend/resume events to stop/start all receiver listeners 2013-06-23 18:11:42 +02:00
Daniel Pavel 273284da39 use number instead of serial to pick devices in ui (faster start-up) 2013-06-23 12:09:46 +02:00
Daniel Pavel 8cd3b8fdef save configuration a little early, better timing on shutdown 2013-06-21 15:21:49 +02:00
Daniel Pavel c1aa341a7a tweaked timing of enabling receiver notifications 2013-06-21 15:20:52 +02:00
Daniel Pavel fd35f23af7 one a separate flag to check if the device is active 2013-06-21 15:17:14 +02:00
Daniel Pavel 11cfc7ea09 enable notification on recevier as soon as possible 2013-06-19 19:46:54 +02:00
Daniel Pavel 56a7a960c3 polling: it may happen that the receiver is removed mid-poll 2013-06-19 16:14:04 +02:00
Daniel Pavel a29609df21 only save the configuration once when Solaar ends 2013-06-17 08:00:00 +02:00
Daniel Pavel 04ea8293a8 persist and restore device settings 2013-06-16 17:41:03 +02:00
Daniel Pavel bde54aba3b proper shutdown of receiver listeners 2013-06-16 17:10:46 +02:00
Daniel Pavel 03e20842fb cleaned-up gtk ui initialization 2013-06-12 14:29:34 +02:00
Daniel Pavel 5cf6777340 more tweaks to idle polling 2013-06-08 21:06:52 +02:00
Daniel Pavel d01d9edb78 tweaked idle polling timings 2013-06-08 16:27:03 +02:00
Daniel Pavel 0a86683392 clean-up in solaar.listener 2013-06-08 16:18:25 +02:00
Daniel Pavel b2b4febd31 receiver notifications: don't set all flags, might fail 2013-06-08 16:18:10 +02:00
Daniel Pavel ed5ce48f65 fixes to polling receiver/device status 2013-06-08 16:16:12 +02:00
Daniel Pavel 46544e1cbe listen for udev events on the GLib main loop 2013-06-07 14:39:04 +02:00
Daniel Pavel 10e736386b user module __name__ when initializing logger 2013-06-07 14:28:13 +02:00
Daniel Pavel 162228aff3 started configuration persistence implementation 2013-06-03 22:01:16 +02:00
Daniel Pavel 131f8f7f45 disable status polling on devices
the regular flow should be reading the battery on all devices now
2013-05-22 20:42:26 +03:00
Daniel Pavel c3b73964d5 improved support for some Nano receivers 2013-05-22 20:41:11 +03:00
Daniel Pavel ef62892f60 pop up a desktop notification if the battery is below 5% 2013-05-18 14:35:33 +03:00
Daniel Pavel a5eeac6e5a enable notifications for peripherals; fixes #27 2013-05-17 23:06:24 +03:00