Servomotor
Dependents: ServomotorTests NerfUSTarget
Diff: source/Servomotor.cpp
- Revision:
- 7:a5b6e6d9ad3d
- Parent:
- 6:8d8268e5a561
- Child:
- 8:e42a3a06e072
diff -r 8d8268e5a561 -r a5b6e6d9ad3d source/Servomotor.cpp --- a/source/Servomotor.cpp Sun Apr 09 23:15:03 2017 +0000 +++ b/source/Servomotor.cpp Tue Apr 11 03:48:35 2017 +0000 @@ -1,7 +1,8 @@ #include "Servomotor.hpp" Servomotor::Servomotor(PwmOutInterface &pwm_out) : - pwm_out(pwm_out) + pwm_out(pwm_out), + up_angle(90) { } @@ -17,10 +18,10 @@ void Servomotor::set_position_up() { - set_angle(0); + set_angle(up_angle); } void Servomotor::set_position_down() { - set_angle(90); -} \ No newline at end of file + set_angle(up_angle - 75); +}