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.

Dependencies:   mbed MODI2C

Revision:
21:c2a2e7cbabdd
Parent:
20:e116e596e540
Child:
27:9e546fa47c33
--- a/RC/RC_Channel.cpp	Mon Nov 05 09:19:01 2012 +0000
+++ b/RC/RC_Channel.cpp	Sat Nov 17 11:49:21 2012 +0000
@@ -3,7 +3,7 @@
 
 RC_Channel::RC_Channel(PinName mypin) : myinterrupt(mypin)
 {
-    time = -1; // start value to see if there was any value yet
+    time = -100; // 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);
@@ -25,7 +25,7 @@
     timer.stop();
     int tester = timer.read_us();
     if(tester >= 1000 && tester <=2000)
-        time = (tester-70);  // TODO: skalierung mit calibrierung (speichern....)
+        time = (tester-70)-1000;  // TODO: skalierung mit calibrierung (speichern....)
     timer.reset();
     timer.start();
 }
@@ -33,5 +33,5 @@
 void RC_Channel::timeoutcheck()
 {
     if (timer.read() > 0.3)
-        time = 0;
+        time = -100;
 }
\ No newline at end of file