Quadcopter software. Flying - Contact me for more details or a copy of the PC ground station code
Dependencies: ConfigFile PID PPM MODSERIAL mbed-rtos mbed MaxbotixDriver TinyGPS filter
Diff: altitudeMonitor.h
- Revision:
- 9:7b194f83e567
diff -r 5a7efcd0c0dd -r 7b194f83e567 altitudeMonitor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/altitudeMonitor.h Sun Feb 22 20:10:12 2015 +0000 @@ -0,0 +1,18 @@ +#include "mbed.h" +#include "rtos.h" +#include "hardware.h" + +// The altitude monitor thread gets the latest altitude from each sensor and combines into one altitude +void AltitudeMonitorThread(void const *args) +{ + printf("Altitude monitor thread started\r\n"); + + while (true) + { + _maxBotixPingAltitude = _maxBotixSensor.read() / 100; // Convert to meters + _barometerAltitude = 0;//_freeIMU.getBaroAlt(); + + + Thread::wait(100); + } +}