Skip to content

Commit 9d65b33

Browse files
committed
Work around float printing issue
1 parent 329d5cb commit 9d65b33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/mcpwm-simple.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fn main() -> anyhow::Result<()> {
8282
let duty = f32::from(x) * 0.01;
8383

8484
if x % 100 == 0 {
85-
println!("Duty {}%", duty);
85+
println!("Duty {}%", x / 100);
8686
}
8787

8888
operator.set_duty_a(duty)?;

0 commit comments

Comments
 (0)