Skip to content

fix: preserve forced mapped digital outputs#719

Open
manux81 wants to merge 2 commits into
Autonomy-Logic:developmentfrom
manux81:fix-debug-force-output-overwrite
Open

fix: preserve forced mapped digital outputs#719
manux81 wants to merge 2 commits into
Autonomy-Logic:developmentfrom
manux81:fix-debug-force-output-overwrite

Conversation

@manux81
Copy link
Copy Markdown

@manux81 manux81 commented Apr 8, 2026

Summary

This fixes debugger forcing for mapped digital outputs on the Arduino Baremetal runtime.

After mbtask(), the runtime copied COILS back into bool_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_output while leaving the existing analog and memory synchronization intact.

Why

We verified the generated mapping for main.vai0 AT %QX0.0 : BOOL was correct:

  • debug.c registered it as BOOL_O_ENUM
  • glueVars.c mapped %QX0.0 to bool_output_ptr[0][0]
  • device configuration mapped %QX0.0 to the expected physical GPIO

The remaining overwrite happened in modbusTask(). A counterproof confirmed the behavior:

  • with the digital-output write-back present, force did not work
  • with it removed, force worked

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.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 8, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (1)
  • resources/sources/Baremetal/Baremetal.ino is excluded by !resources/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: fbb8123f-365b-47b4-bae0-3e6c249519c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant