ardupilot/libraries/AP_Compass/AP_Compass_PX4.h
Lucas De Marchi e6059f5197 AP_Compass: rename files to follow other libraries
AP_Compass.h is the main header to be exported and AP_Compass.cpp its
implementation. There's no need for an additional header.
2016-03-23 17:50:38 -03:00

27 lines
691 B
C++

/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
#pragma once
#include "AP_Compass.h"
#include "AP_Compass_Backend.h"
class AP_Compass_PX4 : public AP_Compass_Backend
{
public:
bool init(void);
void read(void);
void accumulate(void);
AP_Compass_PX4(Compass &compass);
// detect the sensor
static AP_Compass_Backend *detect(Compass &compass);
private:
uint8_t _num_sensors;
uint8_t _instance[COMPASS_MAX_INSTANCES];
int _mag_fd[COMPASS_MAX_INSTANCES];
Vector3f _sum[COMPASS_MAX_INSTANCES];
uint32_t _count[COMPASS_MAX_INSTANCES];
uint64_t _last_timestamp[COMPASS_MAX_INSTANCES];
};