mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 08:58:29 -04:00
4039b51810
Let AP_Compass_Backend call AP::compass() *once* instead of passing the frontend pointer over and over.
20 lines
325 B
C++
20 lines
325 B
C++
#pragma once
|
|
|
|
#include "AP_Compass.h"
|
|
|
|
#define HIL_NUM_COMPASSES 2
|
|
|
|
class AP_Compass_HIL : public AP_Compass_Backend
|
|
{
|
|
public:
|
|
AP_Compass_HIL();
|
|
void read(void);
|
|
bool init(void);
|
|
|
|
// detect the sensor
|
|
static AP_Compass_Backend *detect();
|
|
|
|
private:
|
|
uint8_t _compass_instance[HIL_NUM_COMPASSES];
|
|
};
|