mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 17:38:32 -04:00
089ae0f9f3
this lets the caller not need to know the underlying sample rate. They just ask for what rate updates happen. This also changes the MPU6k filtering to be less than half the sample rate
39 lines
1.0 KiB
C++
39 lines
1.0 KiB
C++
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
#ifndef __AP_INERTIAL_SENSOR_STUB_H__
|
|
#define __AP_INERTIAL_SENSOR_STUB_H__
|
|
|
|
#include <string.h>
|
|
#include <stdint.h>
|
|
|
|
#include "../AP_PeriodicProcess/AP_PeriodicProcess.h"
|
|
#include "AP_InertialSensor.h"
|
|
|
|
class AP_InertialSensor_Stub : public AP_InertialSensor
|
|
{
|
|
public:
|
|
|
|
AP_InertialSensor_Stub() {
|
|
}
|
|
|
|
/* Concrete implementation of AP_InertialSensor functions: */
|
|
bool update();
|
|
bool new_data_available();
|
|
float gx();
|
|
float gy();
|
|
float gz();
|
|
float ax();
|
|
float ay();
|
|
float az();
|
|
float temperature();
|
|
uint32_t get_delta_time_micros();
|
|
uint32_t get_last_sample_time_micros();
|
|
float get_gyro_drift_rate();
|
|
uint16_t num_samples_available();
|
|
|
|
protected:
|
|
uint16_t _init_sensor( AP_PeriodicProcess * scheduler, Sample_rate sample_rate );
|
|
};
|
|
|
|
#endif // __AP_INERTIAL_SENSOR_STUB_H__
|