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

kaidokert / rm32 / 25232272948
63%

Build:
DEFAULT BRANCH: main
Ran 01 May 2026 08:42PM 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

01 May 2026 08:41PM UTC coverage: 62.944% (+0.05%) from 62.897%
25232272948

push

github

web-flow
Embed TickCounters in IsrState, eliminate copy boilerplate (#39)

* Embed TickCounters in IsrState, eliminate copy boilerplate

IsrState had 4 loose fields (ten_khz_counter, one_khz_loop_counter,
armed_timeout_count, tim1_arr) that were copied into a temporary
TickCounters on every ISR entry and copied back after. Replace with
an embedded counters: TickCounters field — zero copy, zero copy-back.

Note: ten_khz_counter and one_khz_loop_counter are incremented but
never read in the ISR — they're dead code from the C port where they
drove the 1kHz PID loop divider (now in MainState::tick).

* Add TickCounters::new() constructor, make fields pub(crate)

Replace struct literal construction with TickCounters::new(tim1_arr).
Fields made pub(crate) — only tim1_arr varies, rest always zero.
Add set_tim1_arr() setter and armed_timeout_count() getter for
cross-crate access.

* Delete dead ten_khz_counter and one_khz_loop_counter from TickCounters

Both were incremented every ISR tick but never read. They were the C
firmware's 1kHz PID loop divider counters — in Rust, PID loops run in
MainState::tick() instead, making these ISR counters orphaned.

TickCounters now has only 2 fields: armed_timeout_count and tim1_arr.

* Make TickCounters fields private

* Remove tim1_arr from TickCounters, read from SharedComm directly

tim1_arr was cached in TickCounters but overwritten from SharedComm
every tick — a stale shadow that served no purpose. The ISR now reads
ctx.shared.tim1_arr() into a local variable at tick start.

Firmware publishes initial tim1_arr to SharedComm before enabling
interrupts, so the ISR sees the correct value from the first tick.

TickCounters is now a single field: armed_timeout_count.

* Delete TickCounters struct, inline armed_timeout_count

TickCounters was a single-field wrapper around a u32 counter.
Replace with a plain &mut u32 in MotorContext. Delete the struct,
its constructor, Default impl, and accessor.

5 of 8 new or added lines in 2 files covered. (62.5%)

3601 of 5721 relevant lines covered (62.94%)

759.24 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
0.0
0.0% rm32/src/bin/harness.rs
1
80.72
0.13% rm32/src/control/isr_logic.rs
Jobs
ID Job ID Ran Files Coverage
1 25232272948.1 01 May 2026 08:42PM UTC 34
62.94
GitHub Action Run
Source Files on build 25232272948
  • Tree
  • List 34
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25232272948
  • b008181b on github
  • Prev Build on main (#25230743663)
  • Next Build on main (#25235654056)
  • 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