AP_HAL_Empty: Remove unneeded private member

This commit is contained in:
Michael du Breuil 2018-11-24 19:23:13 -07:00 committed by Andrew Tridgell
parent b32c5e6f8d
commit 57d3a4fb5f
6 changed files with 1 additions and 32 deletions

View File

@ -8,7 +8,6 @@ namespace Empty {
class I2CDevice;
class I2CDeviceManager;
class OpticalFlow;
class PrivateMember;
class RCInput;
class RCOutput;
class Scheduler;

View File

@ -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"

View File

@ -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

View File

@ -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;
};

View File

@ -1,11 +0,0 @@
#include "PrivateMember.h"
using namespace Empty;
PrivateMember::PrivateMember(uint16_t foo) :
_foo(foo)
{}
void PrivateMember::init() {}

View File

@ -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;
};