2016-02-17 21:25:20 -04:00
|
|
|
#pragma once
|
2011-02-14 00:27:07 -04:00
|
|
|
|
2016-03-10 20:41:18 -04:00
|
|
|
#include "AP_Compass.h"
|
2011-02-14 00:27:07 -04:00
|
|
|
|
2015-10-14 13:04:02 -03:00
|
|
|
#define HIL_NUM_COMPASSES 2
|
2015-05-15 18:06:04 -03:00
|
|
|
|
2014-11-15 21:58:23 -04:00
|
|
|
class AP_Compass_HIL : public AP_Compass_Backend
|
2011-02-14 00:27:07 -04:00
|
|
|
{
|
2012-08-17 03:19:22 -03:00
|
|
|
public:
|
2014-11-15 21:58:23 -04:00
|
|
|
AP_Compass_HIL(Compass &compass);
|
2015-02-23 19:17:44 -04:00
|
|
|
void read(void);
|
2014-11-15 21:58:23 -04:00
|
|
|
bool init(void);
|
|
|
|
|
|
|
|
// detect the sensor
|
|
|
|
static AP_Compass_Backend *detect(Compass &compass);
|
2013-12-29 07:55:20 -04:00
|
|
|
|
2013-03-01 10:58:55 -04:00
|
|
|
private:
|
2015-05-15 18:06:04 -03:00
|
|
|
uint8_t _compass_instance[HIL_NUM_COMPASSES];
|
2011-02-14 00:27:07 -04:00
|
|
|
};
|