Skip to content

Commit b7d4865

Browse files
jk jensenrahul-thakoor
authored andcommitted
Add fix for comparing max_pulse_width to frame_width
1 parent 994ffbf commit b7d4865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/output_devices.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,7 @@ impl Servo {
745745

746746
/// Set the servo's maximum pulse width
747747
pub fn set_max_pulse_width(&mut self, value: u64) {
748-
if value >= self.frame_width {
748+
if value >= self.frame_width * 1000 {
749749
println!("max_pulse_width must be less than frame_width");
750750
} else {
751751
self.max_pulse_width = value;

0 commit comments

Comments
 (0)