Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: PwmIn/PwmIn.cpp
- Revision:
- 151:5bbb15351798
- Parent:
- 150:08c13bfc7417
- Child:
- 155:7c6005933d4c
--- a/PwmIn/PwmIn.cpp Thu May 04 14:23:13 2017 +0000 +++ b/PwmIn/PwmIn.cpp Thu May 04 14:34:34 2017 +0000 @@ -2,7 +2,7 @@ #include "PwmIn.h" #include "MathHelpers.h" -PwmIn::PwmIn(PinName pin, int usec_min, int usec_max, int usec_crazy_low, int usec_crazy_hi) +PwmIn::PwmIn(PinName pin, int usec_min, int usec_max) { int_in = new InterruptIn(pin); dig_in = new DigitalIn(pin); @@ -10,8 +10,6 @@ int_in->fall(this, &PwmIn::handle_fall); this->usec_min = usec_min; this->usec_max = usec_max; - this->usec_crazy_low = usec_crazy_low; - this->usec_crazy_hi = usec_crazy_hi; usecs = usec_min; blocked = false; @@ -51,7 +49,6 @@ return; } - //if (usecs_new <= usec_crazy_hi && usecs_new >= usec_crazy_low && risen) usecs = usecs_new; if (risen) usecs = usecs_new; risen = false; }