ardupilot/libraries/AP_Compass/AP_Compass_qflight.h

33 lines
650 B
C
Raw Normal View History

2015-12-14 01:00:15 -04:00
#pragma once
#include <AP_HAL/AP_HAL.h>
2015-12-14 01:00:15 -04:00
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_QFLIGHT
#include <AP_HAL_Linux/qflight/qflight_buffer.h>
#include "AP_Compass.h"
#include "AP_Compass_Backend.h"
2015-12-14 01:00:15 -04:00
class AP_Compass_QFLIGHT : public AP_Compass_Backend
{
public:
bool init(void);
void read(void);
AP_Compass_QFLIGHT(Compass &compass);
// detect the sensor
static AP_Compass_Backend *detect(Compass &compass);
private:
void timer_update();
DSPBuffer::MAG *magbuf;
uint8_t instance;
Vector3f sum;
uint32_t count;
uint32_t last_check_ms;
};
#endif // CONFIG_HAL_BOARD_SUBTYPE