mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_Empty: Remove unneeded private member
This commit is contained in:
parent
b32c5e6f8d
commit
57d3a4fb5f
|
@ -8,7 +8,6 @@ namespace Empty {
|
|||
class I2CDevice;
|
||||
class I2CDeviceManager;
|
||||
class OpticalFlow;
|
||||
class PrivateMember;
|
||||
class RCInput;
|
||||
class RCOutput;
|
||||
class Scheduler;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "GPIO.h"
|
||||
#include "I2CDevice.h"
|
||||
#include "OpticalFlow.h"
|
||||
#include "PrivateMember.h"
|
||||
#include "RCInput.h"
|
||||
#include "RCOutput.h"
|
||||
#include "Scheduler.h"
|
||||
|
|
|
@ -40,8 +40,7 @@ HAL_Empty::HAL_Empty() :
|
|||
&rcoutDriver,
|
||||
&schedulerInstance,
|
||||
&utilInstance,
|
||||
&opticalFlowDriver),
|
||||
_member(new EmptyPrivateMember(123))
|
||||
&opticalFlowDriver)
|
||||
{}
|
||||
|
||||
void HAL_Empty::run(int argc, char* const argv[], Callbacks* callbacks) const
|
||||
|
|
|
@ -3,12 +3,9 @@
|
|||
#include <AP_HAL/AP_HAL.h>
|
||||
|
||||
#include "AP_HAL_Empty_Namespace.h"
|
||||
#include "PrivateMember.h"
|
||||
|
||||
class HAL_Empty : public AP_HAL::HAL {
|
||||
public:
|
||||
HAL_Empty();
|
||||
void run(int argc, char* const* argv, Callbacks* callbacks) const override;
|
||||
private:
|
||||
Empty::PrivateMember *_member;
|
||||
};
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
#include "PrivateMember.h"
|
||||
|
||||
using namespace Empty;
|
||||
|
||||
PrivateMember::PrivateMember(uint16_t foo) :
|
||||
_foo(foo)
|
||||
{}
|
||||
|
||||
void PrivateMember::init() {}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
/* Just a stub as an example of how to implement a private member of an
|
||||
* AP_HAL module */
|
||||
|
||||
#include "AP_HAL_Empty.h"
|
||||
|
||||
class Empty::PrivateMember {
|
||||
public:
|
||||
PrivateMember(uint16_t foo);
|
||||
void init();
|
||||
private:
|
||||
uint16_t _foo;
|
||||
};
|
Loading…
Reference in New Issue