Skip to content
Snippets Groups Projects
Commit 4ba00720 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

AP_Compass: make init() private

not called from frontend
parent 1ea4c693
No related branches found
No related tags found
No related merge requests found
......@@ -35,13 +35,13 @@ public:
virtual ~AP_Compass_AK8963();
bool init() override;
void read() override;
private:
AP_Compass_AK8963(Compass &compass, AP_AK8963_BusDriver *bus,
enum Rotation rotation = ROTATION_NONE);
bool init();
void _make_factory_sensitivity_adjustment(Vector3f &field) const;
void _make_adc_sensitivity_adjustment(Vector3f &field) const;
......
......@@ -30,7 +30,6 @@ public:
static AP_Compass_Backend *probe(Compass &compass,
AP_HAL::OwnPtr<AP_HAL::I2CDevice> dev);
bool init() override;
void read() override;
static constexpr const char *name = "BMM150";
......@@ -41,6 +40,7 @@ private:
/**
* Device periodic callback to read data from the sensor.
*/
bool init();
bool _update();
bool _load_trim_values();
int16_t _compensate_xy(int16_t xy, uint32_t rhall, int32_t txy1, int32_t txy2);
......
......@@ -31,9 +31,6 @@ public:
// override with a custom destructor if need be.
virtual ~AP_Compass_Backend(void) {}
// initialize the magnetometers
virtual bool init(void) = 0;
// read sensor data
virtual void read(void) = 0;
......
......@@ -28,13 +28,13 @@ public:
virtual ~AP_Compass_HMC5843();
bool init() override;
void read() override;
private:
AP_Compass_HMC5843(Compass &compass, AP_HMC5843_BusDriver *bus,
bool force_external, enum Rotation rotation);
bool init();
bool _check_whoami();
bool _calibrate();
bool _setup_sampling_mode();
......
......@@ -16,13 +16,13 @@ public:
static constexpr const char *name = "LSM9DS1";
bool init() override;
void read() override;
virtual ~AP_Compass_LSM9DS1() {}
private:
AP_Compass_LSM9DS1(Compass &compass, AP_HAL::OwnPtr<AP_HAL::Device> dev);
bool init();
bool _check_id(void);
bool _configure(void);
bool _set_scale(void);
......
......@@ -6,7 +6,6 @@
class AP_Compass_QURT : public AP_Compass_Backend
{
public:
bool init(void) override;
void read(void) override;
AP_Compass_QURT(Compass &compass);
......@@ -15,6 +14,7 @@ public:
static AP_Compass_Backend *detect(Compass &compass);
private:
bool init(void);
void timer_update(void);
uint8_t instance;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment