Skip to content

Conversation

@bosh
Copy link
Owner

@bosh bosh commented Oct 9, 2025

No description provided.

bosh and others added 16 commits October 7, 2025 03:08
… not yet supported

and rgb and rgbw (ws2812 and sk6812) can be mixed in on a single port
without any ordering issue (if configured correctly) so there is no need to
distinguish at the header level for them
…shot handling

previously only delay_switch was allowed. Note that the format of these delay events
is event_handler:ms, but unlike the usual where ms means the delay before acting, this ms
represents the duration of the delay (which is applied immediately)
… behavior around device properties named _events
…D: goes to a board and for some reason it is unresponsive. Added logging to see the current iteration of board from config, and what serial commands are being sent, as well as logging the response received. Fix an issue where send_and_wait_for_response_processed wasn't properly timing out and retry. When board initially doesn't respond to ID: and timeout/retry is succesful, a valid response is received but with bad data preceeding the expected ID: and would cause a crash. Improve the parser to search for potential headers in returned data.
Fix an error where send_and_wait_for_response would hang if sending "ID:"" goes to a board and for some reason it is unresponsive.
Added logging to see the current iteration of board from config, and what serial commands are being sent, as well as logging the response received.
Fix an issue where send_and_wait_for_response_processed wasn't properly timing out and retry.
When board initially doesn't respond to ID: and timeout/retry is succesful, a valid response is received but with bad data preceeding the expected ID: and would cause a crash.
Improve the parser to search for potential headers in returned data.

mpf/platforms/fast/communicators/base.py

    Implemented real request/response timeouts & retries:

    Rewrote send_and_wait_for_response() to actually await the arrival event.

    Added send_and_wait_for_response_processed(...) with bounded waits for arrival and processing complete, proper retry loop (supports max_retries = -1), and safe gate release.

    Ensured done_processing_msg_response() releases both gates to avoid deadlocks.

    Hardened serial parsing:

    Replaced naïve msg.decode() with a CR-framed loop that tolerates noise, logs raw bytes, decodes with errors="ignore", strips control chars, and finds valid headers inside a line (so leading junk won’t drop frames).

    Keeps parsing even if a line handler raises (no reader crash).

    Added targeted logging for TX attempts, timeouts, retries, and processing phases.

mpf/platforms/fast/communicators/exp.py

    Discovery & verification:

    Normalized model strings, chose explicit or default addresses, and logged board_name, model, and board_address for each board.

    Logged registration steps and active_board transitions.

    After each registration, issued ID@<addr>: for the EXP and all breakouts with the new processed wait (bounded).

    Message processors:

    _process_id() and _process_br() now signal arrival immediately and call done_processing_msg_response() when done, preventing hangs.

    Added optional debug dump of self.exp_boards_by_address to console for quick inspection.

mpf/platforms/fast/fast_exp_board.py

    LED config quality-of-life:

    Reworked create_led_ports() to build grouped configurations (per 4-header block), auto-fill unassigned ports up to 128 LEDs per group, and emit ER@ programming messages deterministically.

    Added detailed logs per group: overrides, prepared sets, offsets/counts, and ER:P acks.

    Hardware verification:

    Clear logs for EXP vs. breakout verification, min-fw checks, and hw_verified flags.

    Reset flow:

    Explicit BR@ reset, then LED programming, then optional fade setup; logs include correlation IDs.
… keys. SA, SL, /L, -L were being filtered out because they were not in the static list
The parse_incoming_raw_bytes function was rigid in the type of serial
headers that it was looking for.  Alter code to make dynamic.
… kyle_hp_extensions. This includes a fix for parse_incoming_raw_bytes to add SA, /L, -L, etc... as well as making it dynamic to look for all message_processors.keys
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.

3 participants