Commit Graph

157 Commits

Author SHA1 Message Date
Allen Hill c366454c8f Fix mutebus and improve bool literal hygiene 2026-06-15 12:52:58 -07:00
Allen Hill da17c724d6 Fix track change logic (track is/should be serialized as BCD) 2026-06-15 18:52:21 +00:00
Allen Hill c591e87c98 Tweak/fix(?) Initial/Playback/Loading responses 2026-06-13 19:42:05 +00:00
Allen Hill 6a9b8affa2 Fix some safety/ergonomic issues 2026-06-13 19:28:56 +00:00
Allen Hill 3d0f92c824 Shift state machine from main loop to driver file 2026-06-13 19:27:55 +00:00
Allen Hill c0bb9c4018 Use bool consistently now that we're on C23 2026-05-15 18:28:54 -07:00
Allen Hill 9fbaa7a55f Flatten msg triage switches to dispatch on first 3 bytes together (as uint32_t) 2026-05-15 18:28:54 -07:00
Allen Hill 79516796d5 Replace iffy bitfield use with uin8_t fields and enums 2026-05-15 18:28:54 -07:00
Allen Hill 4d4b08f67d Remove unused enum 2026-05-15 18:28:54 -07:00
Allen Hill 57d0513d04 Prevent pushing nullptr into queues 2026-05-15 18:28:54 -07:00
Allen Hill d09aa684f8 Make global message templates static const 2026-05-15 18:28:54 -07:00
Allen Hill 83271ef0d2 Use better name for variable 2026-05-15 18:28:54 -07:00
Allen Hill 87f0ddc2d4 Rename field broadcast => is_unicast
Improves readability and logical flow clarity
2026-05-15 18:28:54 -07:00
Allen Hill f68fa5ab60 Manually inline sbi/cbi macros 2026-05-15 18:28:54 -07:00
Allen Hill 877e88fcd0 Use ATOMIC_BLOCK instead of manual cli/sei 2026-05-15 18:28:54 -07:00
Allen Hill 194c3928f9 Use more readable byte access patterns (compiles the same) 2026-05-15 18:28:54 -07:00
Allen Hill 99ca75ce45 Fix missed REPL docs update 2026-05-15 18:28:54 -07:00
Allen Hill 1fa9d63ac5 Add some missing volatile annotations 2026-05-15 18:28:54 -07:00
Allen Hill aefc698fca Mark incrementRead as static inline 2026-05-15 18:28:54 -07:00
Allen Hill e5797b598a Fix binary msg read edge cases 2026-05-15 18:28:54 -07:00
Allen Hill b510eaaef8 Tighten PIT interrupt and avoid some BCD edge-cases 2026-05-15 18:28:54 -07:00
Allen Hill 28ddf2139b Archive old files 2026-05-15 18:28:54 -07:00
Allen Hill 263b7c1753 Specify enum size to drop (potentially surprising) enum size compile flag 2026-05-13 18:21:39 -07:00
Allen Hill cc65542842 Add QoL correctness checks (not strictly necessary but behaves better) 2026-05-13 18:20:59 -07:00
Allen Hill 423fafb709 Improve error messaging/handling 2026-05-13 18:19:00 -07:00
Allen Hill 042521a744 Fix incorrect definition/initialization of caches 2026-05-13 18:17:27 -07:00
Allen Hill 551cdaa23c Reduce variable scope (global => local; reduce local var scope size) 2026-05-13 18:16:33 -07:00
Allen Hill 62f755c265 Group pointer increments for better assembly (in recent GCC) 2026-05-12 10:14:15 -07:00
Allen Hill 1e715d1daa Fix bad function call 2026-05-10 18:55:23 -07:00
Allen Hill a0071ea862 Fix incorrect address-of (and rename argument resp => out) 2026-05-10 18:53:42 -07:00
Allen Hill 746551351f store the results of tmp & 1 to avoid recalc 2026-05-10 18:52:43 -07:00
Allen Hill 8caee73765 Reorder error enums for simpler partial success check 2026-05-10 18:50:55 -07:00
Allen Hill 6b45648314 Fix memory leaks from refactor 2026-05-08 15:32:18 -07:00
Allen Hill ceea8b79a0 Cleanup flag setting cases 2026-05-08 13:20:14 -07:00
Allen Hill 4de22e01f3 Substantially refactor ~everything to separate concerns and improve flow clarity
Highlights:
- Remove all use of malloc and friends
- Refactor message handling functions to work with references
- Move core message read => triage => respond logic loop to main
  function
- Improve message triage and support follow-up messages
- Refactor hex byte parsing
- Disable periodic interrupt when not playing
2026-05-08 13:10:14 -07:00
Allen Hill bdb1a8af0d fixup readframe error logs 2026-05-06 13:59:04 -07:00
Allen Hill 18c5a28410 Fix incorrect time updating logic 2026-05-06 13:57:36 -07:00
Allen Hill c904bc2c89 Refactor AVCLAN_parseframe call signature to avoid dynamic allocs 2026-05-05 20:35:05 -07:00
Allen Hill 9b2c71fa6e Add some compiler warnings and fix revealed bugs 2026-05-05 18:17:02 -07:00
Allen Hill a37140a779 Refactor error handling in read/send frame 2026-05-05 14:37:09 -07:00
Allen Hill 67cec49a60 Combine similar sendbit functions 2026-05-05 12:32:43 -07:00
Allen Hill 28db9fb6b5 Refactor canned message setting 2026-05-05 11:32:57 -07:00
Allen Hill 9d044cd1f7 Recognize more actions 2026-05-05 11:27:34 -07:00
Allen Hill 3d67e0a2ca Refactor message handling switch tree 2026-05-05 11:27:09 -07:00
Allen Hill 6adffe1619 Convert some local macros to inline functions 2026-05-04 12:30:45 -07:00
Allen Hill 628ec2de5f Replace use of numeric literals with appropriate enums 2026-05-04 11:47:34 -07:00
Allen Hill cbb1c1a30d Improve action/function names and tweak report responses 2025-10-08 21:26:04 -07:00
Allen Hill 977041bd67 Commit old working changes 2024-08-23 12:26:42 -07:00
Allen Hill fadd2c4259 Refactor frame handling and response code 2023-10-28 14:41:56 -04:00
Allen Hill 18ae9a48cc Optimize binary printframe (reduce number of RS232_print calls) 2023-10-28 14:38:15 -04:00