Abstraction for the glider class
Glider.h
- Committer:
- chasefarmer2808
- Date:
- 2017-04-14
- Revision:
- 7:dc93fe573846
- Parent:
- 6:bb82dd1618c2
- Child:
- 8:7fc2caa10bbb
File content as of revision 7:dc93fe573846:
#ifndef Glider_H #define Glider_H #include "mbed.h" #include <string> #include "HMC5883L.h" #include "BMP180.h" #define SAVE_DATA_FORMAT "%d %d %d" #define CMD_BUZZER 'b' #define CMD_RESET 'r' #define FREQ 1.0 #define CRUZE 0 #define LAND 1 class Glider { public: Serial* dev; Serial* xbee; double heading; float pressure; float temp; float alt; bool cmdFlag; bool transmitFlag; time_t startTime; //saved data time_t missionTime; uint8_t packetCount; //saved data uint8_t state; //saved data HMC5883L* hmc; BMP180* bmp; Glider(Serial* device, PinName sda, PinName scl, PinName tx, PinName rx); InterruptIn xbeeRxInt; void setHeading(); void setTempPress(); void setMissionTime(); void setTransmitFlag(); void initSaveData(); void saveTelem(); void saveData(); void transmitPacket(); void setCommandFlag(); void processCommand(); }; #endif