ubah di nilai float
Fork of Motor by
Revision 3:143494304b66, committed 2017-12-21
- Comitter:
- gatulz
- Date:
- Thu Dec 21 11:12:28 2017 +0000
- Parent:
- 2:11b3ef6b937d
- Commit message:
- update ; - library motor.h; - odometry getalpha; - pw+pneumatic; - tetha + update LROBOT;
Changed in this revision
Motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
Motor.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r 11b3ef6b937d -r 143494304b66 Motor.cpp --- a/Motor.cpp Sun Oct 29 06:04:49 2017 +0000 +++ b/Motor.cpp Thu Dec 21 11:12:28 2017 +0000 @@ -58,3 +58,9 @@ } } + +void Motor::Forcebrake(){ + _pwm = 1.0; + _fwd = 1; + _rev = 1; +}
diff -r 11b3ef6b937d -r 143494304b66 Motor.h --- a/Motor.h Sun Oct 29 06:04:49 2017 +0000 +++ b/Motor.h Thu Dec 21 11:12:28 2017 +0000 @@ -64,6 +64,11 @@ * Brake to VCC => inA = inB = 1 */ void brake(int highLow = BRAKE_HIGH); + + /** + *Brake lebih baik + **/ + void Forcebrake(); protected: PwmOut _pwm;