• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kaidokert / rm32 / 25191985921
63%

Build:
DEFAULT BRANCH: main
Ran 30 Apr 2026 10:15PM UTC
Jobs 1
Files 34
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2026 10:14PM UTC coverage: 61.961% (+0.03%) from 61.936%
25191985921

push

github

web-flow
Fix e_com_time: compute from ISR intervals, not empty main-loop array (#18)

* Fix e_com_time: compute from ISR intervals, not empty main-loop array

The commutation_intervals array in TimingState was never populated by
the firmware ISR, only by the harness's manual copy. This meant
e_com_time, e_rpm, and average_interval were always zero in production.

Fix: move intervals array into Commutation struct (ISR-owned), add
record_interval() called at each step advance (matching C main.c:882),
and compute e_com_time in the ISR's sync section. Main loop now reads
e_com_time from SharedComm instead of computing it from a local array.

Remove the harness's manual intervals copy (no longer needed) and
the now-empty commutation_intervals field from TimingState.

* Add regression test for e_com_time ISR computation

Verifies e_com_time > 100 after motor commutation steps, catching
the bug where the intervals array was never populated by the ISR
(would have produced e_com_time=2 from empty array rounding bias).

* Move e_com_time computation from per-tick to per-step

Computing the 6-interval sum on every 20kHz ISR tick was wasteful —
it only changes when a commutation step advances. Move the computation
into record_interval() which returns the updated e_com_time, and
publish to SharedComm at each of the 3 advance() call sites.

record_interval after advance matches C ordering where step is
incremented before commutation_intervals[step-1] is written.

13 of 17 new or added lines in 3 files covered. (76.47%)

8 existing lines in 3 files now uncovered.

3274 of 5284 relevant lines covered (61.96%)

596.34 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
71.85
-0.52% rm32/src/control/isr_logic.rs

Coverage Regressions

Lines Coverage ∆ File
3
0.0
0.0% rm32/src/bin/harness.rs
3
24.95
0.0% rm32/src/shared_state.rs
2
66.58
-0.85% rm32/src/main_state.rs
Jobs
ID Job ID Ran Files Coverage
1 25191985921.1 30 Apr 2026 10:15PM UTC 34
61.96
GitHub Action Run
Source Files on build 25191985921
  • Tree
  • List 34
  • Changed 7
  • Source Changed 5
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25191985921
  • d9380e99 on github
  • Prev Build on main (#25191056699)
  • Next Build on main (#25192326264)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc