uncrustify libraries/AP_IMU/AP_IMU_Shim.h
This commit is contained in:
parent
37fd49d8de
commit
60aaea7bdb
@ -21,11 +21,14 @@ public:
|
|||||||
virtual void init(Start_style style = COLD_START,
|
virtual void init(Start_style style = COLD_START,
|
||||||
void (*callback)(unsigned long t) = delay,
|
void (*callback)(unsigned long t) = delay,
|
||||||
void (*flash_leds_cb)(bool on) = NULL,
|
void (*flash_leds_cb)(bool on) = NULL,
|
||||||
AP_PeriodicProcess *scheduler = NULL) {};
|
AP_PeriodicProcess * scheduler = NULL) {
|
||||||
|
};
|
||||||
virtual void init_accel(void (*callback)(unsigned long t) = delay,
|
virtual void init_accel(void (*callback)(unsigned long t) = delay,
|
||||||
void (*flash_leds_cb)(bool on) = NULL) {};
|
void (*flash_leds_cb)(bool on) = NULL) {
|
||||||
|
};
|
||||||
virtual void init_gyro(void (*callback)(unsigned long t) = delay,
|
virtual void init_gyro(void (*callback)(unsigned long t) = delay,
|
||||||
void (*flash_leds_cb)(bool on) = NULL) {};
|
void (*flash_leds_cb)(bool on) = NULL) {
|
||||||
|
};
|
||||||
virtual bool update(void) {
|
virtual bool update(void) {
|
||||||
bool updated = _updated;
|
bool updated = _updated;
|
||||||
_updated = false;
|
_updated = false;
|
||||||
@ -40,37 +43,61 @@ public:
|
|||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
virtual bool new_data_available(void) { return true; }
|
virtual bool new_data_available(void) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
float gx() { return 0; }
|
float gx() {
|
||||||
float gy() { return 0; }
|
return 0;
|
||||||
float gz() { return 0; }
|
}
|
||||||
float ax() { return 0; }
|
float gy() {
|
||||||
float ay() { return 0; }
|
return 0;
|
||||||
float az() { return 0; }
|
}
|
||||||
|
float gz() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
float ax() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
float ay() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
float az() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void ax(const int v) { }
|
void ax(const int v) {
|
||||||
void ay(const int v) { }
|
}
|
||||||
void az(const int v) { }
|
void ay(const int v) {
|
||||||
|
}
|
||||||
|
void az(const int v) {
|
||||||
|
}
|
||||||
|
|
||||||
/// Set the gyro vector. ::update will return
|
/// Set the gyro vector. ::update will return
|
||||||
/// true once after this call.
|
/// true once after this call.
|
||||||
///
|
///
|
||||||
/// @param v The new gyro vector.
|
/// @param v The new gyro vector.
|
||||||
///
|
///
|
||||||
void set_gyro(Vector3f v) { _gyro = v; _updated = true; }
|
void set_gyro(Vector3f v) {
|
||||||
|
_gyro = v; _updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
/// Set the accelerometer vector. ::update will return
|
/// Set the accelerometer vector. ::update will return
|
||||||
/// true once after this call.
|
/// true once after this call.
|
||||||
///
|
///
|
||||||
/// @param v The new accelerometer vector.
|
/// @param v The new accelerometer vector.
|
||||||
///
|
///
|
||||||
void set_accel(Vector3f v) { _accel = v; _updated = true; }
|
void set_accel(Vector3f v) {
|
||||||
|
_accel = v; _updated = true;
|
||||||
|
}
|
||||||
|
|
||||||
// dummy save method
|
// dummy save method
|
||||||
void save(void) { }
|
void save(void) {
|
||||||
|
}
|
||||||
|
|
||||||
float get_gyro_drift_rate(void) { return 0; }
|
float get_gyro_drift_rate(void) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user