Added standalone analyzer layout

This commit is contained in:
maze authored and maze committed 2026-10-29 17:29:54 +01:00
1 parent 0196bb3707
commit f9bc5bb3b8
5 files changed
+110 -13

No files matched your search

+12
View File
@@ -190,14 +190,19 @@ func (c *controllerContext) handleInput(event hardware.InputEvent) {
c.handleRotaryPress()
}
case hardware.RotaryLongPressEvent:
var handled bool
for _, layout := range c.layouts {
if layout.IsVisible() {
if handler, ok := layout.(app.ButtonInputHandler); ok {
log.WithField("layout", layout.String()).Debug("dispatch button long press")
handler.HandleButtonLongPress(c)
handled = true
}
}
}
if !handled {
c.handleRotaryLongPress()
}
default:
log.Warn("unhandled input event")
}
@@ -228,4 +233,11 @@ func (c *controllerContext) handleRotaryPress() {
c.Show(c.layouts[nextIndex])
}
func (c *controllerContext) handleRotaryLongPress() {
log := logrus.NewEntry(logrus.StandardLogger())
log.Debug("no handler for rotary press event, switching to settings")
c.Show(c.settingsLayout)
}
var _ app.Context = (*controllerContext)(nil)