Joseph Roberts / Mbed 2 deprecated QuadCopter

Dependencies:   ConfigFile PID PPM MODSERIAL mbed-rtos mbed MaxbotixDriver TinyGPS filter

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers altitudeMonitor.h Source File

altitudeMonitor.h

00001 #include "mbed.h"
00002 #include "rtos.h"
00003 #include "hardware.h"
00004 
00005 // The altitude monitor thread gets the latest altitude from each sensor and combines into one altitude
00006 void AltitudeMonitorThread(void const *args) 
00007 {
00008     printf("Altitude monitor thread started\r\n");
00009 
00010     while (true) 
00011     {
00012         _maxBotixPingAltitude = _maxBotixSensor.read() / 100; // Convert to meters
00013         _barometerAltitude = 0;//_freeIMU.getBaroAlt();
00014         
00015         
00016         Thread::wait(100);
00017     }
00018 }