fix: preserve forced mapped digital outputs#719
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
This fixes debugger forcing for mapped digital outputs on the Arduino Baremetal runtime.
After
mbtask(), the runtime copiedCOILSback intobool_output. For located outputs such as%QX0.0, that write-back overwrote the value forced by the debugger on every cycle.This change stops mirroring digital output coils back into
bool_outputwhile leaving the existing analog and memory synchronization intact.Why
We verified the generated mapping for
main.vai0 AT %QX0.0 : BOOLwas correct:debug.cregistered it asBOOL_O_ENUMglueVars.cmapped%QX0.0tobool_output_ptr[0][0]%QX0.0to the expected physical GPIOThe remaining overwrite happened in
modbusTask(). A counterproof confirmed the behavior:Notes
This intentionally changes the digital output Modbus write-back path. Direct coil writes from Modbus clients will no longer be mirrored back into mapped digital outputs through that specific reverse-copy step.