2011-12-28 05:31:36 -04:00
|
|
|
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
2011-02-14 00:27:07 -04:00
|
|
|
#ifndef AP_Compass_HIL_H
|
|
|
|
#define AP_Compass_HIL_H
|
|
|
|
|
|
|
|
#include "Compass.h"
|
|
|
|
|
2015-05-15 18:06:04 -03:00
|
|
|
#if COMPASS_MAX_INSTANCES == 1
|
|
|
|
# define HIL_NUM_COMPASSES 1
|
|
|
|
#else
|
|
|
|
# define HIL_NUM_COMPASSES 2
|
|
|
|
#endif
|
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|