NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.
Diff: RC/RC_Channel.cpp
- Revision:
- 15:753c5d6a63b3
- Parent:
- 12:67a06c9b69d5
- Child:
- 20:e116e596e540
diff -r cf260677ecde -r 753c5d6a63b3 RC/RC_Channel.cpp --- a/RC/RC_Channel.cpp Sat Oct 27 10:53:43 2012 +0000 +++ b/RC/RC_Channel.cpp Mon Oct 29 16:43:10 2012 +0000 @@ -6,7 +6,7 @@ time = -1; // start value to see if there was any value yet myinterrupt.rise(this, &RC_Channel::rise); myinterrupt.fall(this, &RC_Channel::fall); - //timeoutchecker.attach(this, &RC_Channel::timeoutcheck, 1); + timeoutchecker.attach(this, &RC_Channel::timeoutcheck, 1); } @@ -18,13 +18,11 @@ void RC_Channel::rise() { timer.start(); - LEDs.set(2); } void RC_Channel::fall() { timer.stop(); - LEDs.reset(2); int tester = timer.read_us(); if(tester >= 1000 && tester <=2000) time = tester;