Receiver interface for the fischertechnik IR control set

Dependencies:   NeedfulThings

Receiver interface for the fischertechnik IR control set.

An mbed port of the code found on this ft community WIKI page The ft IR remote control uses some kind of RC-MM Protocol . When any of the controls is applied the remote control sends updates at a rate of at 1/120ms or 1/90ms depending on the senders frequency setting. Each message delivers the complete remote control status encoded into 30 bits. The structure of the message can be seen in FtControlSetMessage.h.

I assume that the ft control set works fine with standard 38kHz IR detectors. I have used a CHQ0038 from a broken DVD Player. It can be connected directly to the mbed: GND, VCC->3.3V and the signal line to any of the numbered mbed gpios.

The PDM timing of the ft IR control set isn't that exact. Thus receive errors occur quite frequently. I am observing an error rate somewhere between 3% and 5%. This driver "ignores" up to 3 consecutive receive errors, i.e. it just indicates an error but still provides the last correctly received message, before it resets the message to zero after the fourth error.

Revision:
5:7ce37fae13ff
Parent:
4:c1517188f6ec
--- a/FtControlSetReceiver.h	Sat Mar 23 21:51:13 2013 +0000
+++ b/FtControlSetReceiver.h	Mon Mar 25 21:08:37 2013 +0000
@@ -4,24 +4,10 @@
 #include "FtControlSetMessage.h"
 #include "InterruptIn.h"
 #include "FunctionPointer.h"
-#include "Timeout.h"
+#include "TimeoutTweaked.h"
 
 using namespace mbed;
 
-/// Tweaked Timeout class, that publishes the protected TimerEvent methods
-/// remove and insert, which are a bit faster than detach and attach.
-struct TimeoutTweaked : public Timeout {
-    /// calls protected TimerEvent::remove()that
-    /// just removes the timer event from the schedule but keeps the handler attached before
-    inline void remove() {
-        TimerEvent::remove();
-    }
-    /// calls proteccted TimerEvent::insert() that inserts a new timeout event to the schedule at the given timestamp 
-    inline void insert(unsigned int timestamp) {
-        TimerEvent::insert(timestamp);
-    }
-};
-
 /// Receiver interface for the fischertechnik IR control set
 ///
 /// An mbed port of the code found on this <A HREF="http://www.ftcommunity.de/wiki.php?action=show&topic_id=36">ft community WIKI page</a>