ardupilot/libraries/AP_PeriodicProcess/AP_PeriodicProcessStub.h
Andrew Tridgell 8cc2b7669b PeriodicProcess: added set_failsafe() call
this adds an optional failsafe function that will be called in the
timer loop
2011-12-21 23:31:38 +11:00

24 lines
614 B
C++

#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(ap_procedure proc);
void set_failsafe(ap_procedure proc);
static void run(void);
protected:
static int _period;
static void (*_proc)(void);
static void (*_failsafe)(void);
};
#endif