mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1900 Fixed Constructor calling chain
This commit is contained in:
parent
ffcd058478
commit
4b7edee534
@ -43,6 +43,10 @@ extern "C" {
|
||||
|
||||
// Private constants
|
||||
|
||||
// pointer to a singleton instance
|
||||
FixedWingAutoTakeoffController *FixedWingAutoTakeoffController::p_inst = 0;
|
||||
|
||||
|
||||
// Called when mode first engaged
|
||||
void FixedWingAutoTakeoffController::Activate(void)
|
||||
{
|
||||
|
@ -43,7 +43,17 @@ typedef enum {
|
||||
} FixedWingAutoTakeoffControllerState_T;
|
||||
|
||||
class FixedWingAutoTakeoffController : public FixedWingFlyController {
|
||||
protected:
|
||||
static FixedWingAutoTakeoffController *p_inst;
|
||||
|
||||
public:
|
||||
static FixedWingFlyController *instance()
|
||||
{
|
||||
if (!p_inst) {
|
||||
p_inst = new FixedWingAutoTakeoffController();
|
||||
}
|
||||
return p_inst;
|
||||
}
|
||||
void Activate(void);
|
||||
void UpdateAutoPilot(void);
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "pathfollowercontrol.h"
|
||||
|
||||
class FixedWingFlyController : public PathFollowerControl {
|
||||
private:
|
||||
protected:
|
||||
static FixedWingFlyController *p_inst;
|
||||
FixedWingFlyController();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user