Commit Graph
98 Commits
Author SHA1 Message Date
pixl 82ff2bdf38 Create features::UnsupportedFeature exception
Creates an abstraction layer for hidpp10/hidpp20/etc. UnsupportedFeature
exceptions.
2020-07-18 21:15:39 -04:00
pixl 0928b39e03 Add ChangeHostAction support 2020-07-15 17:43:24 -04:00
pixl d59daf86e2 Add ChangeHost hidpp20 feature 2020-07-15 15:18:28 -04:00
pixl f51ba0f681 Remove unused assert warnings when building Release 2020-07-15 13:27:21 -04:00
pixl 9b3183c791 Add version.txt for tarballs 2020-07-15 13:23:11 -04:00
pixl b75b9794d1 Fix versioning system 2020-07-15 13:22:05 -04:00
pixlandGitHub c83739beb9 Merge pull request #99 from PixlOne/refactor
Refactor LogiOps
2020-07-15 09:29:13 -04:00
pixl 56d10898fb Print CIDs on device connect 2020-07-15 00:26:39 -04:00
pixl 018bdb83ad Add ability to ignore devices 2020-07-14 16:21:14 -04:00
pixl 497ec07bdf Properly set PID on dummy connect events 2020-07-14 16:20:58 -04:00
pixl 89b9829b84 Fix bug where GetPairingInfo would be offset by -1. 2020-07-14 16:20:06 -04:00
pixl d3d4a2755a Apply clang-tidy inspections 2020-07-14 00:12:40 -04:00
pixl 937225b6f2 TODO cleanup: Remove error check todo in DeviceManager 2020-07-13 22:44:22 -04:00
pixl 825967b140 TODO cleanup: Add PowerSwitchLocation enum 2020-07-13 22:42:23 -04:00
pixl 944a6419b4 Remove unused DeviceFinder.cpp
How'd that get in here anyways?
2020-07-13 22:06:15 -04:00
pixl 3659ec25fb Add additional DJ report descriptor
Should fix invalid DJ reports in #100.
2020-07-13 22:04:50 -04:00
pixl a2718d9023 Fix undetected CIDs 2020-07-13 15:29:40 -04:00
pixl 0f60c3896c Fix usbhid-dump SIGSEGV on #100 2020-07-13 15:12:28 -04:00
pixl dde2993223 Fix crashes when logid starts as root
If logid scans every device, it will either SIGSEGV or not work at all.
This commit should fix bug #100.
2020-07-13 01:14:15 -04:00
pixl 405b314103 Add GitHub Actions 2020-07-12 21:09:37 -04:00
pixl 8f073d66c3 Remove unused dependencies 2020-07-12 16:21:26 -04:00
pixl 4ce76f5927 Listen for events on receiver device on timeout
Previously, if a receiver device didn't respond during the initial scan,
logid would not recognize it until it sent a wakeup/connect event.

This makes it so if the device times out, logid will listen for the next
event from the device and try detecting it. (e.g. shaking the mouse will
make it become detected)
2020-07-12 16:16:50 -04:00
pixl 1a056a1ecf Add mutex for events on Receiver 2020-07-12 16:16:50 -04:00
pixl f7638b0905 Properly output TimeoutError
Fixed issue where receiver devices aren't detected (hopefully).
2020-07-12 16:16:50 -04:00
pixl 9ad8ce0fea Remove README.md warning 2020-07-12 16:16:50 -04:00
pixl 214bbbecbc Remove unused files 2020-07-12 16:16:47 -04:00
pixl b00b4645e4 Add ChangeDPI action 2020-07-12 16:16:25 -04:00
pixl 949a1ee283 Add CycleDPI action 2020-07-12 16:16:24 -04:00
pixl 21b7455919 Add NullAction support 2020-07-12 16:16:24 -04:00
pixl 4117d71c9d Add NoPress gesture mode 2020-07-12 16:16:24 -04:00
pixl 10bb10e5c5 Add Axis gesture 2020-07-12 16:16:24 -04:00
pixl ecfd03fd21 Add OnInterval/OnFewPixels gesture 2020-07-12 16:16:24 -04:00
pixl de8e453bd3 Fix deadlock issue
RawDevice would deadlock in some situations because I/O occured while
the listener was turning on. This also seems to have fixed logid
sometimes not detecting devices on receivers.
2020-07-12 16:16:24 -04:00
pixl 0fbeb1e3c9 Add Gesture support
Only supports OnRelease right now. Also, some bugs were spotted while
writing this:

 - Sometimes deadlocks on startup (cause unknown)
 - Sometimes valid CIDs will be unknown (bug may have been fixed?)
2020-07-12 16:16:24 -04:00
pixl 41049deb35 Fix compiler warnings 2020-07-12 16:16:24 -04:00
pixl d478ef3309 Add error check for bad action type 2020-07-12 16:16:24 -04:00
pixl 1f3fa53721 Add workqueue system 2020-07-12 16:16:24 -04:00
pixl 02d361b541 Add ToggleHiresScroll action 2020-07-12 16:16:24 -04:00
pixl 77f4240ec7 Add ToggleSmartShift action 2020-07-12 16:16:24 -04:00
pixl bc8f1a983a Add configurable I/O timeout 2020-07-12 16:16:24 -04:00
pixl 055d136b09 Add HiresScroll device feature 2020-07-12 16:16:24 -04:00
pixl d6f5c35983 Add HiresScroll hidpp20 feature 2020-07-12 16:16:24 -04:00
pixl 71b0ddd279 Add reset mechanism to logid::Device 2020-07-12 16:16:24 -04:00
pixl 5bf5dc75b5 Implement RemapButton feature
Many changes were made here, too many to list here.
2020-07-12 16:16:22 -04:00
pixl 0b87d3c664 Fixed bug: odd devices would fail Root GetFeature
Some devices throw an hidpp20::Error InvalidFeatureIndex when Root
GetFeature is called with some features (e.g. 0x1b04) as the parameter.

Since Root is a required feature in the HID++ 2.0 protocol, this error
can safely be ignored and treated as an UnsupportedFeature.

Fixes bug in #20 where the Logitech PRO headset would not work.
2020-07-12 16:15:48 -04:00
pixl cd14d8dd27 Add thanks to README.md 2020-07-12 16:15:48 -04:00
pixl 3129cda581 Add hidpp20 ReprogControls support 2020-07-12 16:15:48 -04:00
pixl c382ba1c0b Add getFeature function to Device 2020-07-12 16:15:48 -04:00
pixl b445b979d3 Remove some useless debug output 2020-07-12 16:15:48 -04:00
pixl 4e33ad7593 Add SmartShift Device feature 2020-07-12 16:15:48 -04:00
pixl 5abf777e00 Add SmartShift hidpp20 feature 2020-07-12 16:15:48 -04:00
pixl 07b8fc1af4 Add DPI feature 2020-07-12 16:15:48 -04:00
pixl f6b93b94af Split Configuration into several classes
Each feature should handle its own configuration.
2020-07-12 16:15:48 -04:00
pixl 181be50f88 Use unique pointer for global device manager
Changed from raw pointer to a unique_ptr, also renamed from finder to
device_manager
2020-07-12 16:15:48 -04:00
pixl 5f76ccc4ac Implement AdjustableDPI feature 2020-07-12 16:15:48 -04:00
pixl 1106133f3c Move logger into util/log.h 2020-07-12 16:15:48 -04:00
pixl 4ba9248038 Use safe thread class instead of std::thread 2020-07-12 16:15:48 -04:00
pixl d84363019b Create a safe thread wrapper 2020-07-12 16:15:48 -04:00
pixl ef0a0fab8d Support Reset (0x0020) feature 2020-07-12 16:15:48 -04:00
pixl 7ae46c938d Implement FeatureSet feature 2020-07-12 16:15:48 -04:00
pixl 60e47572d6 Add GPL copyright notice to DeviceFeature.h 2020-07-12 16:15:48 -04:00
pixl 152b9e6cfd Add interface for device features in logid::Device 2020-07-12 16:15:48 -04:00
pixl 1d001237ba Monitor wake up/sleep events with Receiver 2020-07-12 16:15:48 -04:00
pixl 22455af615 Add GPL copyright notice in all C++ source files 2020-07-12 16:15:32 -04:00
pixl dd75df8c18 Use consistent code style
Only files that are currently used in logid are changed.
2020-07-12 16:14:25 -04:00
pixl bd080e7ef6 Fix bug described in 698971a
Feels like a hacky workaround, may come back to this later.
2020-07-12 16:14:24 -04:00
pixl 261d82390b Assert report ID and length before sending 2020-07-12 16:14:24 -04:00
pixl e40da5f0c0 Implement receiver HID++ connect/disconnect events
Many changes were made here but that was the biggest one.

There's currently a bug where std::system_error: Broken pipe is thrown
after launching the daemon with a receiver connector.

A workaround for this bug is to simply shake the mouse while starting
the daemon. I will investigate this soon.
2020-07-12 16:14:24 -04:00
pixl b05e525bbc Add RawReport log level 2020-07-12 16:14:24 -04:00
pixl c04408c2dd Implement logid::backend::dj::ReceiverMonitor 2020-07-12 16:14:24 -04:00
pixl 6bfa52e5c1 Remove libhidpp submodule 2020-07-12 16:14:24 -04:00
pixl fb0b8e88ef Clean up temporary code 2020-07-12 16:14:24 -04:00
pixl f2a7b7b947 Fix long report descriptor check 2020-07-12 16:14:24 -04:00
pixl f0c903d539 Rename DeviceMonitor to DeviceManager 2020-07-12 16:14:24 -04:00
pixl 7f1af81910 Rewrite logid::DeviceMonitor 2020-07-12 16:14:21 -04:00
pixl b41649b0de Implement dj::Receiver class
Again, many things were done here.
2020-07-12 16:13:54 -04:00
pixl 47db60fad8 Fix swapped DefaultDevice and CordedDevice indexes 2020-07-12 16:13:53 -04:00
pixl ecc5062e0f Support getting version of HID++ 1.0 devices 2020-07-12 16:13:53 -04:00
pixl 7571be1f54 Don't create a new thread for each raw event
Threads should be created as necessary, there is no reason to
launch a simple event handler in a new thread.
2020-07-12 16:13:53 -04:00
pixl cc025d3b96 Fully implement Root and virutal Feature class 2020-07-12 16:13:53 -04:00
pixl c21a923ab2 Print version number of device 1 on each raw dev.
Only works on HID++ >=2.0 so far. Also solves a race condition where
the wrong response can be sent to a request.
2020-07-12 16:13:53 -04:00
pixl 14d07c220e Create enum of feature IDs 2020-07-12 16:13:53 -04:00
pixl 91954e8a73 Use shared_ptr for devices in DeviceMonitor 2020-07-12 16:13:53 -04:00
pixl 6b895b3015 Monitor all HID++ reports on wireless device 1
Again, many things were done in this commit such as implementing an
I/O queue, a mutex_queue, and implementing the hidpp::Report class.

I'm expecting commits to be like this until I can get a clean
codebase for the backend.
2020-07-12 16:13:53 -04:00
pixl 1de722b935 Add note about state of branch in README.md 2020-07-12 16:13:52 -04:00
pixl ec4ae56bc4 Implement raw DeviceMonitor
Multiple things have been done in this commit; the base of the new
backend has effectively been created. This branch currently has many
vital parts commented out. Therefore, this branch is currently only
intended for debugging.
2020-07-12 16:13:40 -04:00
pixlandGitHub 7b304b85cf Merge pull request #92 from glunardi/patch-1
Indicate DEFAULT_CONFIG_FILE location
2020-07-08 17:35:39 -04:00
pixlandGitHub 1f16d85d38 Merge pull request #88 from javawithjiva/master
#87 Add string headers to allow building on latest gcc
2020-07-05 15:39:36 -04:00
pixl ef84577b9c Add ability to blacklist devices 2020-07-04 00:10:44 -04:00
pixl 2654f319c6 Move tested devices to TESTED.md 2020-06-21 15:45:50 -04:00
pixlandGitHub a425dcca9e Merge pull request #79 from zv0n/master
M720 confirmed working
2020-06-21 15:41:52 -04:00
pixlandGitHub f5092572ac Create FUNDING.yml 2020-06-20 03:06:51 -04:00
pixlandGitHub 9bb949b87c Change MX Master 2 to MX Master 2S 2020-06-16 18:58:27 -04:00
pixlandGitHub 0e70d0e799 Merge pull request #78 from fourstepper/master
Add MX Master 2 and 3 to supported devices
2020-06-16 18:55:45 -04:00
pixlandGitHub 29abcbe4f7 Merge pull request #77 from Zak-Bahm/master
MX Ergo confirmed working for button mapping
2020-06-15 15:54:00 -04:00
pixlandGitHub 8185061f2e Added dependencies for Debian and Arch 2020-06-15 05:47:03 -04:00
pixlandGitHub 4f5b1ff671 Added donate button to README.md 2020-06-15 03:31:36 -04:00
pixlandGitHub e66039ae41 Merge pull request #68 from zv0n/master
Log device's available CIDs
2020-06-13 01:09:29 -04:00