Skip to content

OSD: Configurable status socket + instant channel confirm - #649

Open
ekalkst wants to merge 2 commits into
shane-mason:mainfrom
ekalkst:osd-configurable-socket
Open

OSD: Configurable status socket + instant channel confirm#649
ekalkst wants to merge 2 commits into
shane-mason:mainfrom
ekalkst:osd-configurable-socket

Conversation

@ekalkst

@ekalkst ekalkst commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What this adds

1. StatusDisplay can read from any socket, not just play_status.socket

StatusDisplayConfig gets a new optional socket_file field (defaults to
the existing play_status.socket, so every current osd.json keeps working
unchanged). This lets a panel be pointed at any other JSON status socket,
for example runtime/press.socket, which remote_controller.py already
writes to on every digit press while a channel number is being entered.

Also guards check_status() against an empty socket file. press.socket
gets truncated back to empty once a channel change is sent, and the OSD
polls at ~30fps, so without this guard it would spam
Unable to parse player status, to the log every frame while idle.

2. Enter/KP_Enter confirms channel entry immediately

number_pressed() already buffers digits and auto-submits after a ~1s
pause (or instantly once 3 digits are entered). This adds an explicit
confirm path: pressing Enter or numpad Enter cancels the pending debounce
timer and sends the channel change right away, so tuning to e.g. channel 1
or 42 does not require waiting out the full timeout.

3. osd/examples/channel_number_entry.json

New example showing the two changes together: the normal channel/network
panel plus a second panel wired to runtime/press.socket that displays
CH {digits} live while typing, then auto-hides shortly after Enter (or
the timeout) confirms the change.

Motivation

Built this for a Flirc remote setup where number pad buttons tune channels
directly. Wanted on screen feedback while typing a multi-digit channel and
a way to confirm immediately instead of always waiting out the debounce.
Both changes are additive and backward compatible; no existing osd.json
or remote mapping behavior changes.

Testing

  • Verified against real hardware (Flirc remote via evdev) tuning to
    multiple 1-2 digit channels with both timeout-based and Enter-confirmed
    entry.
  • Confirmed existing panels (no socket_file set) still read
    play_status.socket as before.
  • Confirmed no log spam from the empty-socket case.

ekalkst added 2 commits August 1, 2026 19:42
StatusDisplay panels were hardcoded to always read runtime/play_status.socket.
This adds an optional socket_file field (defaults to the existing socket, so
all current osd.json configs behave unchanged) so a panel can be pointed at
any other JSON status socket instead.

Motivating use case: remote_controller.py already writes each in-progress
digit press to runtime/press.socket while building up a channel number.
With this change a panel can display that live input (e.g. "CH 42") while
tuning, then auto-hide via the existing display_time behavior.

Also guards against the socket file being empty (remote_controller.py
truncates press.socket once a channel change is sent) - without this,
StatusDisplay would try to json.loads an empty string on every frame and
spam the log.

Adds osd/examples/channel_number_entry.json demonstrating the new field
alongside the existing channel/network panel.
number_pressed() already buffers digits and auto-submits after a 1s pause
(or instantly at 3 digits). This adds an explicit confirm: pressing Enter
or the numpad Enter cancels the pending debounce timer and sends the
channel change immediately, so a 1-2 digit channel (e.g. "1" then Enter)
doesn't require waiting out the full timeout.

Pairs with the new osd/examples/channel_number_entry.json - the live
digit-entry overlay disappears as soon as Enter confirms instead of
lingering for the timeout duration.
@shane-mason

Copy link
Copy Markdown
Owner

Starting review today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants