Servomotor

Dependents:   ServomotorTests NerfUSTarget

Revision:
6:8d8268e5a561
Parent:
5:003d3d682097
Child:
7:a5b6e6d9ad3d
--- a/source/Servomotor.cpp	Sun Apr 09 23:11:11 2017 +0000
+++ b/source/Servomotor.cpp	Sun Apr 09 23:15:03 2017 +0000
@@ -11,8 +11,8 @@
 //Angle 180 degree = duty cycle 2500 ns
 void Servomotor::set_angle(const float angle_degree)
 {
-    const float duty_cycle_ns = (angle_degree / 180.0) * 2000 + 500;
-    pwm_out.pulsewidth_ns(duty_cyclduty_cycle_ns);
+    const float duty_cycle_us = (angle_degree / 180.0) * 2000 + 500;
+    pwm_out.pulsewidth_us(duty_cycle_us);
 }
 
 void Servomotor::set_position_up()