Commit Graph

4 Commits

Author SHA1 Message Date
crosstyan 5ed07253d8 fix(track-core): align RSMT switches to line end
Allow repeated speed-mileage time-segmented schemes to use either the original start-boundary timestamp form or the segment-end timestamp form emitted by older clients.

For RSMT schemes whose first time segment starts at zero, keep switching against the next segment boundary. For schemes whose first time is non-zero, treat each timestamp as the current segment's end time so payloads such as 120/240/360 are accepted and scheduled correctly.

Defer eligible time-segment changes until the track mileage reaches the configured line-length boundary after movement, matching the legacy app-track behavior that avoided mid-line speed pattern changes.

Add runtime tests covering line-end switching and non-zero first time segment acceptance.

Verification: cmake --build build && ctest --test-dir build --output-on-failure
2026-05-27 13:12:17 +08:00
crosstyan 7b0f6a523d feat(emulator): add editable training schema panel
Redesign the DearPyGui emulator into a two-column layout with an interactive training schema editor and runtime preview.

Add JSON load/save support for ST, SM, MT, and RSMT schemes, including draft normalization, conversion to core schemes, and explicit Apply validation so intermediate edits do not restart or block the preview.

Update manual mode to clamp negative mileage, remove speed from manual positioning, preserve stopped runtime state when reloading schemas, and keep linear rendering visible with span-based drawing.

Fix the core linear pingpong render plan so reverse travel remains visible near endpoints and prefix/postfix colors stay tied to physical sides instead of reversing with heading.

Add C++ and Python regressions for schema conversion, emulator edit behavior, manual mode, linear endpoint visibility, and fixed prefix/postfix colors.
2026-05-18 17:23:00 +08:00
crosstyan 1005e50be0 feat(track-core): add portable training runtimes
Move scheme and PID training runtime behavior into the pure track_core layer and expose render sinks for injected strip application.

Add ESP compatibility adapters, Python bindings/test scaffolding, and in-memory render support so app_track_bt can consume core render and runtime logic without duplicating it.

Cover circular/linear rendering boundaries, all scheme runtime types, scheme render_to parity, PID sample de-duplication, speed suppression, and live tuning in track-core tests.
2026-05-18 16:15:45 +08:00
crosstyan 84598cad20 Initial standalone track core 2026-05-15 16:02:44 +08:00