Finished Decoder

Files at this revision

API Documentation at this revision

Comitter:
Ursukar
Date:
Fri Oct 16 08:39:25 2020 +0000
Parent:
2:6b9833ee0cc6
Commit message:
Including the subtraction of the pause

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 6b9833ee0cc6 -r d22eedba5563 main.cpp
--- a/main.cpp	Thu Oct 15 17:50:38 2020 +0000
+++ b/main.cpp	Fri Oct 16 08:39:25 2020 +0000
@@ -1,5 +1,14 @@
 #include "mbed.h"
 
+/************************************************
+*               PPM-Decoder                     *
+*       Gets the signal of a Turnigy iA8        *
+*       2.4GHz PPM-Receiver and saves           *
+*       every channel into an Array. The        *
+*       pauses get subtractet, because          *
+*       the Encoder is generating new ones.     *
+************************************************/
+
 InterruptIn signal(A0);
 Timer t_Receiver_Ch_Signal;
 unsigned short all_Ch[8];
@@ -21,7 +30,7 @@
         return;
     }
     else{
-        all_Ch[state_Of_Signal] = current_Ch;
+        all_Ch[state_Of_Signal] = current_Ch - 400;
         state_Of_Signal++;
     }