/* * barometer.h * * Created on: 18 okt. 2016 * Author: holmis */ #ifndef DRIVERS_BAROMETER_H_ #define DRIVERS_BAROMETER_H_ typedef enum { CALCSTATE_D2_CALCULATION = 0, //Tell the sensor that we want to read D2 CALCSTATE_D2_READ, //Read D2 from the sensor CALCSTATE_D1_CALCULATION, //Tell the sensor that we want to read D1 CALCSTATE_D1_READ, //Read D1 from the sensor CALCSTATE_CALCULATE_PTA //preassure, temp, altidute calc }calculationState; /*********************************************************************** * BRIEF: Initializes the barometer. * INFORMATION: Initializes the barometer and it needs to be called * before anything else when using the barometer. ***********************************************************************/ bool barometer_init(); /*********************************************************************** * BRIEF: Resets the barometer. * INFORMATION: Resets the barometer needs to be called after the init ***********************************************************************/ bool barometer_reset(); /*********************************************************************** * BRIEF: * INFORMATION: ***********************************************************************/ void barometer_CaclulateValues(); /*********************************************************************** * BRIEF: * INFORMATION: ***********************************************************************/ double barometer_GetCurrentPreassure(); /*********************************************************************** * BRIEF: * INFORMATION: ***********************************************************************/ double barometer_GetCurrentTemperature(); /*********************************************************************** * BRIEF: * INFORMATION: ***********************************************************************/ float barometer_GetCurrentAltitude(); #endif /* DRIVERS_BAROMETER_H_ */