Skip to content

Add external node for e-meter on VCAN - #472

Merged
PatMcN7 merged 4 commits into
PurdueElectricRacing:masterfrom
PatMcN7:emeter-vcan
Sep 16, 2026
Merged

PatMcN7 merged 4 commits into
PurdueElectricRacing:masterfrom
PatMcN7:emeter-vcan

Conversation

@PatMcN7

@PatMcN7 PatMcN7 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

@PatMcN7
PatMcN7 requested a review from a team as a code owner September 15, 2026 22:43
Comment thread firmware/generators/configs/external_nodes/E_METER.json
Comment thread firmware/generators/configs/external_nodes/E_METER.json
Comment thread firmware/generators/configs/external_nodes/E_METER.json Outdated
Comment thread firmware/generators/configs/external_nodes/E_METER.json
Comment thread firmware/generators/configs/external_nodes/E_METER.json Outdated
@gitar-bot

gitar-bot Bot commented Sep 16, 2026

Copy link
Copy Markdown
CI failed: GitHub Actions labeler workflow failed due to insufficient token permissions, which is unrelated to the PR changes.

Overview

One failure pattern was found across 2 logs related to a GitHub Actions workflow configuration permission issue.

Failures

GitHub Actions Labeler Permission Error (confidence: high)

  • Type: configuration
  • Affected jobs: 104595530171, 104615782724
  • Related to change: no
  • Root cause: The GitHub Actions workflow lacks the necessary pull-requests or issues write permissions required to set or modify labels via the GitHub API.
  • Suggested fix: Update the workflow file to include appropriate permissions, specifically granting pull-requests: write permissions for the labeler job.

Summary

  • Change-related failures: 0 failures
  • Infrastructure/flaky/workflow failures: 2 failures due to missing workflow permissions
  • Recommended action: Update the repository workflow permissions or the workflow YAML file to grant the necessary integration permissions.
Code Review ✅ Approved 1 closed / 1 findings

Adds external node configuration for the e-meter on VCAN with measurement, status, and temperature messages. The E_METER_STATUS energy float byte-alignment issue has been resolved. No issues remain.

✅ 1 closed
Bug: E_METER_STATUS energy float no longer byte-aligned

📄 firmware/generators/configs/external_nodes/E_METER.json:43-51 📄 firmware/generators/configs/external_nodes/E_METER.json:52-66
The old 6-bit reserved field kept the first byte full (violation+logging+reserved=8 bits), so energy started at a byte boundary. Replacing it with only two 1-bit bools (fault_active, fault_prev_active) leaves just 4 bits before energy, so the 32-bit float is now packed at bit offset 4 and straddles bytes, and the following reserved bytes shift too. Since E_METER is an external node describing a device we don't generate firmware for, this layout must match the real E-Meter frame — if the device byte-aligns energy, every decode will be wrong. Add a 4-bit reserved field after fault_prev_active to restore byte alignment (violation+logging+fault_active+fault_prev_active+reserved(4) = 8 bits).

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Tip

Comment Gitar fix CI or enable auto-apply: gitar auto-apply:on

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@PatMcN7
PatMcN7 merged commit a373a59 into PurdueElectricRacing:master Sep 16, 2026
4 of 5 checks passed
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.

2 participants