ardupilot/libraries/AP_Compass/AP_Compass_HIL.h
Staroselskii Georgii c207d8c6a8 AP_Compass: add milligauss counterparts to get_field() and get_offsets()
From now on there's a pair get_field_milligauss() and
get_offsets_milligauss() that can make the transition to the common
units across all compasses easier.
2015-09-09 10:38:16 +10:00

29 lines
598 B
C++

/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#ifndef AP_Compass_HIL_H
#define AP_Compass_HIL_H
#include "Compass.h"
#if COMPASS_MAX_INSTANCES == 1
# define HIL_NUM_COMPASSES 1
#else
# define HIL_NUM_COMPASSES 2
#endif
class AP_Compass_HIL : public AP_Compass_Backend
{
public:
AP_Compass_HIL(Compass &compass);
void read(void);
bool init(void);
float get_conversion_ratio(void) override;
// detect the sensor
static AP_Compass_Backend *detect(Compass &compass);
private:
uint8_t _compass_instance[HIL_NUM_COMPASSES];
};
#endif