Start implementing a channel for timer-based events.
This commit is contained in:
parent
f12d119116
commit
bf1bb868e5
2 changed files with 50 additions and 23 deletions
|
@ -1,6 +1,10 @@
|
|||
package mappingrules
|
||||
|
||||
import "github.com/holoplot/go-evdev"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/holoplot/go-evdev"
|
||||
)
|
||||
|
||||
type MappingRule interface {
|
||||
MatchEvent(*evdev.InputDevice, *evdev.InputEvent, *string) *evdev.InputEvent
|
||||
|
@ -32,6 +36,14 @@ type LatchedMappingRule struct {
|
|||
State bool
|
||||
}
|
||||
|
||||
// TODO: How are we going to implement this? It needs to operate on a timer...
|
||||
type ProportionalAxisMappingRule struct {
|
||||
MappingRuleBase
|
||||
Input RuleTarget
|
||||
Output RuleTarget
|
||||
LastEvent time.Time
|
||||
}
|
||||
|
||||
type RuleTarget struct {
|
||||
DeviceName string
|
||||
ModeSelect []string
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue