Committer:
narshu
Date:
Thu Apr 26 20:11:48 2012 +0000
Revision:
2:8aa491f77a0b
Parent:
0:e238496b8073

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
narshu 0:e238496b8073 1
narshu 0:e238496b8073 2 #ifndef IR_H
narshu 0:e238496b8073 3 #define IR_H
narshu 0:e238496b8073 4
narshu 0:e238496b8073 5 #include "mbed.h"
narshu 0:e238496b8073 6
narshu 0:e238496b8073 7 //forward declaration of class Kalman to avoid cyclic include
narshu 0:e238496b8073 8 class Kalman;
narshu 0:e238496b8073 9
narshu 0:e238496b8073 10 class IR{
narshu 0:e238496b8073 11 public:
narshu 0:e238496b8073 12
narshu 0:e238496b8073 13 Serial IRserial;
narshu 0:e238496b8073 14
narshu 0:e238496b8073 15 bool angleInit; // = false;
narshu 0:e238496b8073 16 float angleOffset; // = 0;
narshu 0:e238496b8073 17
narshu 2:8aa491f77a0b 18 IR(Kalman &kalmanin, PinName TX, PinName RX);
narshu 0:e238496b8073 19 void detachisr();
narshu 0:e238496b8073 20 void attachisr();
narshu 0:e238496b8073 21 void vIRValueISR (void);
narshu 0:e238496b8073 22
narshu 0:e238496b8073 23 private:
narshu 0:e238496b8073 24 //reference to the kalman object to run the updates on
narshu 0:e238496b8073 25 Kalman& kalman;
narshu 0:e238496b8073 26 };
narshu 0:e238496b8073 27
narshu 0:e238496b8073 28 #endif //IR_H