Eurobot2012_Primary

Dependencies:   mbed Eurobot_2012_Primary

Committer:
narshu
Date:
Thu Apr 26 23:49:49 2012 +0000
Revision:
5:7ac07bf30707
Parent:
4:7b7334441da9
Fixed Sonar and most of the kalman filter except for the IR serial;

Who changed what in which revision?

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