Rc 3.2.0#503
Open
nicolas-rabault wants to merge 14 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
On BCM-family PL011 (RPi), tcdrain() blocks ~7.9 ms per call regardless of frame size. The driver polls FR.BUSY which is sticky on this hardware; TIOCOUTQ returns 0 immediately after write(), confirming the kernel TX buffer is drained well before tcdrain returns. Measured on a 10-byte frame at 1 Mbps (100 µs wire time): tcdrain=7578 µs p50, write=20 µs p50 — tcdrain accounted for 96% of the P1 RTT floor. Replace tcdrain() with clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME) for (size * 10 bits * ns_per_bit) + 50 µs margin. The per-bit timing uses the existing timeout_ns_per_bit, so higher baudrates work without further changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
After a valid frame's CRC, the Robus state machine sets ctx.rx.callback = Recep_Drop to ignore trailing garbage until Recep_Timeout fires DEFAULT_TIMEOUT bit-times later. This assumes an inter-frame silence at least as long as the timeout. On RS485 half-duplex without bus arbitration (the Linux HAL has GetTxLockState stubbed to false), two uncoordinated nodes can TX back-to-back with a gap far shorter than that. Observed in S1: Tartine's bg_pub and its CMD_ECHO_REPLY arrived 14 µs apart — all ten reply bytes were dropped by Recep_Drop, producing a 300 ms timeout on iter 528. When the RX thread reads a byte while the callback is Recep_Drop, immediately call Recep_Reset so the byte is treated as the start of a new frame. Fix is Linux-HAL-local; MCU behavior is untouched. Verified via event trace: echo bytes matched cleanly during the timeout (no TX collision), and reply bytes were fully received within 700 µs but not dispatched until the next iter's TX kicked the state machine. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Mirrors the native gate_wscom project structure but runs the Luos network over Robus (RS485 on RPI GPIO via the LINUX Robus HAL). The Gate exposes itself to external clients over a WebSocket pipe bound on all interfaces, so pyluos can connect from anywhere on the LAN. Two build envs: rpi_robus (default, real RS485 hardware) and rpi_ws (WebSocket broker for dev without hardware). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
port_manager.h conditionally declares PortMng_WatchdogCheck() when NORT is defined, but on the LINUX HAL NORT is defined inside robus_hal_config.h (pulled in via robus_hal.h). The previous include order parsed port_manager.h first, so the prototype was skipped and robus.c/port_manager.c fell back to an implicit declaration once NORT got defined later by robus_hal.h. Reorder the includes so the HAL header is parsed first and NORT is visible to port_manager.h. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Align assignments, wrap multi-line macro, and fix whitespace to match the CI clang-format 1.5.0 expectations on files touched by this branch (engine/IO, robus_network/HAL/LINUX, robus_network/src). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add a Robus support natively running on Raspberry PI
Adds a writable 128-byte buffer behind the existing s_url pointer and exposes ws_hal_set_broker / Ws_SetBroker to override the compile-time WS_NETWORK_BROKER_ADDR default. Must be called before Ws_Init; no effect afterwards (Ws_Init captures the URL during mg_ws_connect). Additive change: existing callers that rely on the compile-time default are unaffected. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
feat(ws_network): add Ws_SetBroker for runtime broker override
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog