Browse Source

AP_HAL_Empty: Remove unneeded private member

mission-4.1.18
Michael du Breuil 6 years ago committed by Andrew Tridgell
parent
commit
57d3a4fb5f
  1. 1
      libraries/AP_HAL_Empty/AP_HAL_Empty_Namespace.h
  2. 1
      libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h
  3. 3
      libraries/AP_HAL_Empty/HAL_Empty_Class.cpp
  4. 3
      libraries/AP_HAL_Empty/HAL_Empty_Class.h
  5. 11
      libraries/AP_HAL_Empty/PrivateMember.cpp
  6. 14
      libraries/AP_HAL_Empty/PrivateMember.h

1
libraries/AP_HAL_Empty/AP_HAL_Empty_Namespace.h

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

1
libraries/AP_HAL_Empty/AP_HAL_Empty_Private.h

@ -8,7 +8,6 @@ @@ -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"

3
libraries/AP_HAL_Empty/HAL_Empty_Class.cpp

@ -40,8 +40,7 @@ HAL_Empty::HAL_Empty() : @@ -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
libraries/AP_HAL_Empty/HAL_Empty_Class.h

@ -3,12 +3,9 @@ @@ -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;
};

11
libraries/AP_HAL_Empty/PrivateMember.cpp

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

14
libraries/AP_HAL_Empty/PrivateMember.h

@ -1,14 +0,0 @@ @@ -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…
Cancel
Save