1
0
Commit Graph

29 Commits

Author SHA1 Message Date
Daniel Prilik
bcb0194c80 Update bug_report.md
mention running with `RUST_BACKTRACE=1`
2020-11-13 10:09:33 -05:00
Daniel Prilik
066c635bd7 Separate "vanilla" Volume mode from Media + Volume mode 2020-11-07 11:45:26 -05:00
Daniel Prilik
ae58e16610 use TAG+="uaccess" in udev rules + fix hidraw perms
Big thanks to Jakub Pruchnik for letting me know about the hidraw issue
and providing a udev rules file to fix it!
2020-11-07 11:31:24 -05:00
Daniel Prilik
b237f4a0f3 README updates 2020-11-07 11:15:15 -05:00
Daniel Prilik
c66fac539f add double-click to mute in Volume mode 2020-11-07 11:00:34 -05:00
Daniel Prilik
5b594ab6d0 avoid dropping first input after daemon is spawned 2020-11-07 10:58:36 -05:00
Daniel Prilik
0f16091422 ensure meta mode uses previously selected mode 2020-11-07 10:54:07 -05:00
Daniel Prilik
ee2c09c690 enable experimental smooth scrolling support 2020-11-06 10:55:47 -05:00
Daniel Prilik
68676cc1d1 put auto haptic params in mode meta 2020-11-06 00:48:38 -05:00
Daniel Prilik
f7a261cb8a use libudev to handle device disconnect/reconnect
This change has substantially bumped up the daemon's overall robustness,
as the code now ensures that the controller will only start once the
/dev/input/eventXX file is set up, which was causing all sorts of issues
in the past.

Additionally, this change enables the daemon to run as a proper
background task that _doesn't_ constantly die / need to be restarted,
which removes the need for any janky udev "on add" rules, and instead, a
simple systemd user service will suffice.
2020-11-06 00:22:56 -05:00
Daniel Prilik
559a28c2d7 Update issue templates 2020-11-05 15:46:51 -05:00
Daniel Prilik
fed2060872 refactor fakeinput + invert main thread function
- fakeinput is now just a series of free functions that access the global
  static, which makes more sense than having some arbitrary
  zero-sized-struct with associated methods on it.
- instead of having the active notification run in its own thread, it
  now runs on the main thread, and the controller runs in a separate
  thread. This results in midly nicer code, at least IMO.

Also, I've had to disable optimizations on the evdev_rs crate, as it
seems to be segfaulting on release builds. Very spooky, but it's not
something I'm super interested in debugging right now, so I'll just work
around it. It's not like I need the _blazing fast performance_ from a
Rust wrapper around a C library anyways...
2020-11-05 10:26:11 -05:00
Daniel Prilik
905c33ad4a stop using DynResult for error handling
I plan to refactor the code to have a single "fatal_error" channel that
all threads get a handle to, and `Box<dyn Error>` can't be sent between
threads safely.
2020-11-04 11:50:13 -05:00
Daniel Prilik
31d86e165a clean up some constants 2020-11-04 11:09:22 -05:00
Daniel Prilik
4f25a73eb3 experimental multitouch based smooth scrolling
high-resolution mouse wheels aren't supported in userland yet, so why
don't we fake a high resolution touchpad instead 😄

it's somewhat working, though it seems to crash on startup when
installed (among other weird bugs).
2020-11-02 18:50:45 -05:00
Daniel Prilik
3285021903 fix udev rule 2020-11-02 18:50:20 -05:00
Daniel Prilik
636a12f2e6 fix underflow on debug build 2020-11-02 18:47:56 -05:00
Daniel Prilik
a099750be2 fix inverted next/prev song 2020-11-02 18:39:24 -05:00
Daniel Prilik
ffa936a0e3 split scroll/zoom into two modes
accidentally switching to zoom mode ended up being pretty annoying
2020-11-01 23:55:51 -05:00
Daniel Prilik
0edac73be3 README tweaks 2020-11-01 23:49:16 -05:00
Daniel Prilik
bd5db3dc67 clean up notification when terminated 2020-11-01 23:30:12 -05:00
Daniel Prilik
a22f560f2c Paddle tweaks
disable recv_timeout when the mode isn't active + move all fakeinput
stuff into the worker.
2020-10-31 00:43:16 -04:00
Daniel Prilik
4716dbe5bc add .gitattributes for notes/ folder
no, this isn't a C project smh
2020-10-31 00:17:20 -04:00
Daniel Prilik
82e08c8e4a add barebones on-disk mode persistance 2020-10-31 00:16:16 -04:00
Daniel Prilik
d14a92dfe5 add long-press + notif based mode switching
oooooh boy, this is looking pretty slick. I'm kind-of impressed I was
able to throw this together in ~2 days of post-work hacking (though I
guess they were some pretty late-nights...)

There's really only one feature left that I _need_ to implement, which
is the on-disk persistence for selected mode. That shouldn't be too
tricky though...
2020-10-30 23:39:12 -04:00
Daniel Prilik
e6fa6845fe haptics!
https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/radial-controller-protocol-implementation

With a little bit of trial and error (and a crash-course in how the heck
HID even works), I figured out how to get the dial to provide haptic
feedback!

Along the way, I also learned that you can take advantage of the
(incorrectly named) Resolution Multiplier field to customize how many
"steps" the dial should have, offloading the work to the device itself!

Very cool!!
2020-10-30 19:59:23 -04:00
Daniel Prilik
858209484f update to Upstream evdev_rs
currently pinned to upstream master, which is ~0.4.0, modulo some minor
internal tweaks + my PR to implement Send on `Device` and
`UInputDevice`

https://github.com/ndesh26/evdev-rs/pull/55

It looks like there are some larger breaking changes coming down the
pipeline as well? Change is always good, so I'll update whenever 0.5.0
is released as well :)
2020-10-30 10:28:55 -04:00
Daniel Prilik
cf1b0a4eb4 add scroll + notifications
oh my god it took far too long to get notifications working...
2020-10-29 19:35:10 -04:00
Daniel Prilik
c4039edc55 initial commit 2020-10-29 00:31:11 -04:00