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

kaidokert / rm32 / 25206113199
63%

Build:
DEFAULT BRANCH: main
Ran 01 May 2026 07:11AM 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 07:10AM UTC coverage: 62.661% (+0.6%) from 62.057%
25206113199

push

github

web-flow
BemfState encapsulation, PWM compare methods, ramp bug fix (#30)

* BemfState encapsulation, PWM compare methods, ramp bug fix, constants

Make BemfState fields fully private (11 fields), move BEMF logic from
isr_logic.rs and bemf.rs into BemfState methods in state.rs:
- sync_config, update, zero_cross_detected, record_zero_cross
- update_timing_from_timer, record_zc_timing, reset_for_step
- reset_after_commutation, com_timer_delay

Add DutyState PWM compare methods:
- pwm_compare(tim1_arr) — duty to timer compare value
- brake_compare(drag_brake_strength, tim1_arr) — brake output

Fix pre-existing ramp bug: ramp_limit used duty.last > 500 instead of
average_interval > 500 for RPM-based ramp profile selection (matches C).
Add 4 unit tests for ramp profile selection.

Extract 8 magic numbers into named constants in constants.rs.
Simplify clamp_ceilings using .min() chain.

state.rs pub(crate) fields: 37 → 13 (BemfState + DutyState fully private).

* Remove accidentally tracked working docs from repo

* Revert .gitignore additions for working docs

* Fix wait_time u16 truncation and reset_for_step missing zc_found clear

Two wait_time bugs: record_zero_cross and update_timing_from_timer
truncated new_ci to u16 BEFORE dividing by 2. At low RPM (new_ci >
65535), this produces completely wrong wait_time. C code divides
the u32 value first, then truncates on assignment to u16.

reset_for_step was missing zc_found = false. C code clears zcfound
together with bemfcounter after every commutation step. Without this,
zero_cross_detected() stays false after the first detection in the
startup path, stalling old_routine startup.

128 of 142 new or added lines in 3 files covered. (90.14%)

1 existing line in 1 file now uncovered.

3541 of 5651 relevant lines covered (62.66%)

779.09 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
80.59
4.97% rm32/src/control/isr_logic.rs
7
85.34
3.25% rm32/src/control/state.rs

Coverage Regressions

Lines Coverage ∆ File
1
80.59
4.97% rm32/src/control/isr_logic.rs
Jobs
ID Job ID Ran Files Coverage
1 25206113199.1 01 May 2026 07:11AM UTC 34
62.66
GitHub Action Run
Source Files on build 25206113199
  • Tree
  • List 34
  • Changed 4
  • Source Changed 3
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25206113199
  • b9a10261 on github
  • Prev Build on main (#25204537662)
  • Next Build on main (#25207070949)
  • 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