7 changed files with 91 additions and 0 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
|
||||
#include "AP_InertialSensor_Stub.h" |
||||
|
||||
void AP_InertialSensor_Stub::init( AP_PeriodicProcess * scheduler ) {} |
||||
|
||||
/*================ AP_INERTIALSENSOR PUBLIC INTERFACE ==================== */ |
||||
|
||||
bool AP_InertialSensor_Stub::update( void ) {} |
||||
|
||||
|
||||
float AP_InertialSensor_Stub::gx() { return 0.0f; } |
||||
float AP_InertialSensor_Stub::gy() { return 0.0f; } |
||||
float AP_InertialSensor_Stub::gz() { return 0.0f; } |
||||
|
||||
void AP_InertialSensor_Stub::get_gyros( float * g ) { } |
||||
|
||||
float AP_InertialSensor_Stub::ax() { return 0.0f; } |
||||
float AP_InertialSensor_Stub::ay() { return 0.0f; } |
||||
float AP_InertialSensor_Stub::az() { return 0.0f; } |
||||
|
||||
void AP_InertialSensor_Stub::get_accels( float * a ) {} |
||||
void AP_InertialSensor_Stub::get_sensors( float * sensors ) {} |
||||
|
||||
float AP_InertialSensor_Stub::temperature() { return 0.0; } |
||||
uint32_t AP_InertialSensor_Stub::sample_time() { return 0; } |
||||
void AP_InertialSensor_Stub::reset_sample_time() {} |
@ -0,0 +1,35 @@
@@ -0,0 +1,35 @@
|
||||
|
||||
#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() {} |
||||
|
||||
void init( AP_PeriodicProcess * scheduler ); |
||||
|
||||
/* Concrete implementation of AP_InertialSensor functions: */ |
||||
bool update(); |
||||
float gx(); |
||||
float gy(); |
||||
float gz(); |
||||
void get_gyros( float * ); |
||||
float ax(); |
||||
float ay(); |
||||
float az(); |
||||
void get_accels( float * ); |
||||
void get_sensors( float * ); |
||||
float temperature(); |
||||
uint32_t sample_time(); |
||||
void reset_sample_time(); |
||||
}; |
||||
|
||||
#endif // __AP_INERTIAL_SENSOR_STUB_H__
|
@ -0,0 +1,6 @@
@@ -0,0 +1,6 @@
|
||||
|
||||
#include "AP_PeriodicProcessStub.h" |
||||
AP_PeriodicProcessStub::AP_PeriodicProcessStub(int period) {} |
||||
void AP_PeriodicProcessStub::init( Arduino_Mega_ISR_Registry * isr_reg ){} |
||||
void AP_PeriodicProcessStub::register_process(void (*proc)(void) ) {} |
||||
void AP_PeriodicProcessStub::run(void) {} |
@ -0,0 +1,21 @@
@@ -0,0 +1,21 @@
|
||||
|
||||
#ifndef __AP_PERIODIC_PROCESS_STUB_H__ |
||||
#define __AP_PERIODIC_PROCESS_STUB_H__ |
||||
|
||||
#include "PeriodicProcess.h" |
||||
#include "../Arduino_Mega_ISR_Registry/Arduino_Mega_ISR_Registry.h" |
||||
|
||||
|
||||
class AP_PeriodicProcessStub : public AP_PeriodicProcess |
||||
{ |
||||
public: |
||||
AP_PeriodicProcessStub(int period = 0); |
||||
void init( Arduino_Mega_ISR_Registry * isr_reg ); |
||||
void register_process(void (* proc)(void)); |
||||
static void run(void); |
||||
protected: |
||||
static int _period; |
||||
static void (*_proc)(void); |
||||
}; |
||||
|
||||
#endif |
Loading…
Reference in new issue