Support live re-loading of rules. (#2)

Reviewed-on: #2
Co-authored-by: Anna Rose Wiggins <annabunches@gmail.com>
Co-committed-by: Anna Rose Wiggins <annabunches@gmail.com>
This commit is contained in:
Anna Rose Wiggins 2025-07-15 23:38:53 +00:00 committed by Anna Rose Wiggins
parent 4ebcbb4dc9
commit e1940006d8
4 changed files with 102 additions and 25 deletions

View file

@ -3,7 +3,6 @@ package mappingrules
import (
"time"
"git.annabunches.net/annabunches/joyful/internal/logger"
"github.com/holoplot/go-evdev"
"github.com/jonboulle/clockwork"
)
@ -53,10 +52,6 @@ func (rule *MappingRuleAxisToRelaxis) MatchEvent(
return nil, nil
}
defer func() {
logger.Logf("DEBUG: Rule '%s' nextEvent == '%v' with device value '%d'", rule.Name, rule.nextEvent, event.Value)
}()
// If we're inside the deadzone, unset the next event
if rule.Input.InDeadZone(event.Value) {
rule.nextEvent = NoNextEvent