Implement axis targets, axis -> button and axis -> relative axis mappings. (#1)
Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com> Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
parent
ff38db6596
commit
e617a6eda6
25 changed files with 903 additions and 130 deletions
|
@ -9,7 +9,7 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
TimerCheckIntervalMs = 250
|
||||
TimerCheckIntervalMs = 1
|
||||
DeviceCheckIntervalMs = 1
|
||||
)
|
||||
|
||||
|
@ -28,12 +28,12 @@ func eventWatcher(device *evdev.InputDevice, channel chan<- ChannelEvent) {
|
|||
}
|
||||
}
|
||||
|
||||
func timerWatcher(rule *mappingrules.MappingRuleAxisToButton, channel chan<- ChannelEvent) {
|
||||
func timerWatcher(rule mappingrules.TimedEventEmitter, channel chan<- ChannelEvent) {
|
||||
for {
|
||||
event := rule.TimerEvent()
|
||||
if event != nil {
|
||||
channel <- ChannelEvent{
|
||||
Device: rule.Output.Device,
|
||||
Device: rule.GetOutputDevice(),
|
||||
Event: event,
|
||||
Type: ChannelEventTimer,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue