mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
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 I2CDevice;
|
||||||
class I2CDeviceManager;
|
class I2CDeviceManager;
|
||||||
class OpticalFlow;
|
class OpticalFlow;
|
||||||
class PrivateMember;
|
|
||||||
class RCInput;
|
class RCInput;
|
||||||
class RCOutput;
|
class RCOutput;
|
||||||
class Scheduler;
|
class Scheduler;
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
#include "GPIO.h"
|
#include "GPIO.h"
|
||||||
#include "I2CDevice.h"
|
#include "I2CDevice.h"
|
||||||
#include "OpticalFlow.h"
|
#include "OpticalFlow.h"
|
||||||
#include "PrivateMember.h"
|
|
||||||
#include "RCInput.h"
|
#include "RCInput.h"
|
||||||
#include "RCOutput.h"
|
#include "RCOutput.h"
|
||||||
#include "Scheduler.h"
|
#include "Scheduler.h"
|
||||||
|
@ -40,8 +40,7 @@ HAL_Empty::HAL_Empty() :
|
|||||||
&rcoutDriver,
|
&rcoutDriver,
|
||||||
&schedulerInstance,
|
&schedulerInstance,
|
||||||
&utilInstance,
|
&utilInstance,
|
||||||
&opticalFlowDriver),
|
&opticalFlowDriver)
|
||||||
_member(new EmptyPrivateMember(123))
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void HAL_Empty::run(int argc, char* const argv[], Callbacks* callbacks) const
|
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/AP_HAL.h>
|
||||||
|
|
||||||
#include "AP_HAL_Empty_Namespace.h"
|
#include "AP_HAL_Empty_Namespace.h"
|
||||||
#include "PrivateMember.h"
|
|
||||||
|
|
||||||
class HAL_Empty : public AP_HAL::HAL {
|
class HAL_Empty : public AP_HAL::HAL {
|
||||||
public:
|
public:
|
||||||
HAL_Empty();
|
HAL_Empty();
|
||||||
void run(int argc, char* const* argv, Callbacks* callbacks) const override;
|
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
Block a user