all: use CLASS_NO_COPY() macro

This commit is contained in:
jackhong12 2022-09-30 17:50:43 +08:00 committed by Andrew Tridgell
parent 0f359c6a4e
commit 4a4f361a17
108 changed files with 114 additions and 220 deletions

View File

@ -18,8 +18,7 @@ public:
Mode() {} Mode() {}
// do not allow copying // do not allow copying
Mode(const Mode &other) = delete; CLASS_NO_COPY(Mode);
Mode &operator=(const Mode&) = delete;
// returns a unique number specific to this mode // returns a unique number specific to this mode
virtual Mode::Number number() const = 0; virtual Mode::Number number() const = 0;

View File

@ -16,8 +16,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Arming_Copter(const AP_Arming_Copter &other) = delete; CLASS_NO_COPY(AP_Arming_Copter);
AP_Arming_Copter &operator=(const AP_Arming_Copter&) = delete;
bool rc_calibration_checks(bool display_failure) override; bool rc_calibration_checks(bool display_failure) override;

View File

@ -23,8 +23,7 @@ public:
AP_Rally_Copter() : AP_Rally() { } AP_Rally_Copter() : AP_Rally() { }
/* Do not allow copies */ /* Do not allow copies */
AP_Rally_Copter(const AP_Rally_Copter &other) = delete; CLASS_NO_COPY(AP_Rally_Copter);
AP_Rally_Copter &operator=(const AP_Rally_Copter&) = delete;
private: private:
bool is_valid(const Location &rally_point) const override; bool is_valid(const Location &rally_point) const override;

View File

@ -12,8 +12,7 @@ public:
using AP_Avoidance::AP_Avoidance; using AP_Avoidance::AP_Avoidance;
/* Do not allow copies */ /* Do not allow copies */
AP_Avoidance_Copter(const AP_Avoidance_Copter &other) = delete; CLASS_NO_COPY(AP_Avoidance_Copter);
AP_Avoidance_Copter &operator=(const AP_Avoidance_Copter&) = delete;
private: private:
// helper function to set modes and always succeed // helper function to set modes and always succeed

View File

@ -48,8 +48,7 @@ public:
Mode(void); Mode(void);
// do not allow copying // do not allow copying
Mode(const Mode &other) = delete; CLASS_NO_COPY(Mode);
Mode &operator=(const Mode&) = delete;
// returns a unique number specific to this mode // returns a unique number specific to this mode
virtual Number mode_number() const = 0; virtual Number mode_number() const = 0;

View File

@ -15,8 +15,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Arming_Plane(const AP_Arming_Plane &other) = delete; CLASS_NO_COPY(AP_Arming_Plane);
AP_Arming_Plane &operator=(const AP_Arming_Plane&) = delete;
bool pre_arm_checks(bool report) override; bool pre_arm_checks(bool report) override;
bool arm_checks(AP_Arming::Method method) override; bool arm_checks(AP_Arming::Method method) override;

View File

@ -12,8 +12,7 @@ public:
using AP_Avoidance::AP_Avoidance; using AP_Avoidance::AP_Avoidance;
/* Do not allow copies */ /* Do not allow copies */
AP_Avoidance_Plane(const AP_Avoidance_Plane &other) = delete; CLASS_NO_COPY(AP_Avoidance_Plane);
AP_Avoidance_Plane &operator=(const AP_Avoidance_Plane&) = delete;
protected: protected:
// override avoidance handler // override avoidance handler

View File

@ -16,8 +16,7 @@ class Mode
public: public:
/* Do not allow copies */ /* Do not allow copies */
Mode(const Mode &other) = delete; CLASS_NO_COPY(Mode);
Mode &operator=(const Mode&) = delete;
// Auto Pilot modes // Auto Pilot modes
// ---------------- // ----------------

View File

@ -8,8 +8,7 @@ public:
AP_Arming_Sub() : AP_Arming() { } AP_Arming_Sub() : AP_Arming() { }
/* Do not allow copies */ /* Do not allow copies */
AP_Arming_Sub(const AP_Arming_Sub &other) = delete; CLASS_NO_COPY(AP_Arming_Sub);
AP_Arming_Sub &operator=(const AP_Arming_Sub&) = delete;
bool rc_calibration_checks(bool display_failure) override; bool rc_calibration_checks(bool display_failure) override;
bool pre_arm_checks(bool display_failure) override; bool pre_arm_checks(bool display_failure) override;

View File

@ -16,8 +16,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Arming_Blimp(const AP_Arming_Blimp &other) = delete; CLASS_NO_COPY(AP_Arming_Blimp);
AP_Arming_Blimp &operator=(const AP_Arming_Blimp&) = delete;
bool rc_calibration_checks(bool display_failure) override; bool rc_calibration_checks(bool display_failure) override;

View File

@ -23,8 +23,7 @@ public:
Mode(void); Mode(void);
// do not allow copying // do not allow copying
Mode(const Mode &other) = delete; CLASS_NO_COPY(Mode);
Mode &operator=(const Mode&) = delete;
// child classes should override these methods // child classes should override these methods
virtual bool init(bool ignore_checks) virtual bool init(bool ignore_checks)

View File

@ -13,8 +13,7 @@ public:
AP_Arming_Rover() : AP_Arming() { } AP_Arming_Rover() : AP_Arming() { }
/* Do not allow copies */ /* Do not allow copies */
AP_Arming_Rover(const AP_Arming_Rover &other) = delete; CLASS_NO_COPY(AP_Arming_Rover);
AP_Arming_Rover &operator=(const AP_Arming_Rover&) = delete;
bool pre_arm_checks(bool report) override; bool pre_arm_checks(bool report) override;
bool arm_checks(AP_Arming::Method method) override; bool arm_checks(AP_Arming::Method method) override;

View File

@ -23,8 +23,7 @@ public:
AP_Rally_Rover() : AP_Rally() { } AP_Rally_Rover() : AP_Rally() { }
/* Do not allow copies */ /* Do not allow copies */
AP_Rally_Rover(const AP_Rally_Rover &other) = delete; CLASS_NO_COPY(AP_Rally_Rover);
AP_Rally_Rover &operator=(const AP_Rally_Rover&) = delete;
private: private:
bool is_valid(const Location &rally_point) const override; bool is_valid(const Location &rally_point) const override;

View File

@ -33,8 +33,7 @@ public:
Mode(); Mode();
// do not allow copying // do not allow copying
Mode(const Mode &other) = delete; CLASS_NO_COPY(Mode);
Mode &operator=(const Mode&) = delete;
// enter this mode, returns false if we failed to enter // enter this mode, returns false if we failed to enter
bool enter(); bool enter();

View File

@ -30,8 +30,7 @@ public:
AC_Avoid(); AC_Avoid();
/* Do not allow copies */ /* Do not allow copies */
AC_Avoid(const AC_Avoid &other) = delete; CLASS_NO_COPY(AC_Avoid);
AC_Avoid &operator=(const AC_Avoid&) = delete;
// get singleton instance // get singleton instance
static AC_Avoid *get_singleton() { static AC_Avoid *get_singleton() {

View File

@ -18,8 +18,7 @@ public:
AP_OAPathPlanner(); AP_OAPathPlanner();
/* Do not allow copies */ /* Do not allow copies */
AP_OAPathPlanner(const AP_OAPathPlanner &other) = delete; CLASS_NO_COPY(AP_OAPathPlanner);
AP_OAPathPlanner &operator=(const AP_OAPathPlanner&) = delete;
// get singleton instance // get singleton instance
static AP_OAPathPlanner *get_singleton() { static AP_OAPathPlanner *get_singleton() {

View File

@ -44,8 +44,7 @@ public:
AC_Fence(); AC_Fence();
/* Do not allow copies */ /* Do not allow copies */
AC_Fence(const AC_Fence &other) = delete; CLASS_NO_COPY(AC_Fence);
AC_Fence &operator=(const AC_Fence&) = delete;
void init() { void init() {
_poly_loader.init(); _poly_loader.init();

View File

@ -49,8 +49,8 @@ public:
AC_PolyFence_loader(AP_Int8 &total) : AC_PolyFence_loader(AP_Int8 &total) :
_total(total) {} _total(total) {}
AC_PolyFence_loader(const AC_PolyFence_loader &other) = delete; /* Do not allow copies */
AC_PolyFence_loader &operator=(const AC_PolyFence_loader&) = delete; CLASS_NO_COPY(AC_PolyFence_loader);
void init(); void init();

View File

@ -17,8 +17,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AC_InputManager(const AC_InputManager &other) = delete; CLASS_NO_COPY(AC_InputManager);
AC_InputManager &operator=(const AC_InputManager&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];
void set_loop_rate(uint16_t loop_rate) { _loop_rate = loop_rate; } void set_loop_rate(uint16_t loop_rate) { _loop_rate = loop_rate; }

View File

@ -25,8 +25,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AC_InputManager_Heli(const AC_InputManager_Heli &other) = delete; CLASS_NO_COPY(AC_InputManager_Heli);
AC_InputManager_Heli &operator=(const AC_InputManager_Heli&) = delete;
// get_pilot_desired_collective - rescale's pilot collective pitch input in Stabilize and Acro modes // get_pilot_desired_collective - rescale's pilot collective pitch input in Stabilize and Acro modes
float get_pilot_desired_collective(int16_t control_in); float get_pilot_desired_collective(int16_t control_in);

View File

@ -27,8 +27,7 @@ public:
AC_PrecLand(); AC_PrecLand();
/* Do not allow copies */ /* Do not allow copies */
AC_PrecLand(const AC_PrecLand &other) = delete; CLASS_NO_COPY(AC_PrecLand);
AC_PrecLand &operator=(const AC_PrecLand&) = delete;
// return singleton // return singleton
static AC_PrecLand *get_singleton() { static AC_PrecLand *get_singleton() {

View File

@ -38,8 +38,7 @@ public:
AC_Sprayer(); AC_Sprayer();
/* Do not allow copies */ /* Do not allow copies */
AC_Sprayer(const AC_Sprayer &other) = delete; CLASS_NO_COPY(AC_Sprayer);
AC_Sprayer &operator=(const AC_Sprayer&) = delete;
static AC_Sprayer *get_singleton(); static AC_Sprayer *get_singleton();
static AC_Sprayer *_singleton; static AC_Sprayer *_singleton;

View File

@ -12,8 +12,7 @@ public:
AP_PitchController(const AP_Vehicle::FixedWing &parms); AP_PitchController(const AP_Vehicle::FixedWing &parms);
/* Do not allow copies */ /* Do not allow copies */
AP_PitchController(const AP_PitchController &other) = delete; CLASS_NO_COPY(AP_PitchController);
AP_PitchController &operator=(const AP_PitchController&) = delete;
float get_rate_out(float desired_rate, float scaler); float get_rate_out(float desired_rate, float scaler);
float get_servo_out(int32_t angle_err, float scaler, bool disable_integrator, bool ground_mode); float get_servo_out(int32_t angle_err, float scaler, bool disable_integrator, bool ground_mode);

View File

@ -12,8 +12,7 @@ public:
AP_RollController(const AP_Vehicle::FixedWing &parms); AP_RollController(const AP_Vehicle::FixedWing &parms);
/* Do not allow copies */ /* Do not allow copies */
AP_RollController(const AP_RollController &other) = delete; CLASS_NO_COPY(AP_RollController);
AP_RollController &operator=(const AP_RollController&) = delete;
float get_rate_out(float desired_rate, float scaler); float get_rate_out(float desired_rate, float scaler);
float get_servo_out(int32_t angle_err, float scaler, bool disable_integrator, bool ground_mode); float get_servo_out(int32_t angle_err, float scaler, bool disable_integrator, bool ground_mode);

View File

@ -12,8 +12,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_SteerController(const AP_SteerController &other) = delete; CLASS_NO_COPY(AP_SteerController);
AP_SteerController &operator=(const AP_SteerController&) = delete;
/* /*
return a steering servo output from -4500 to 4500 given a return a steering servo output from -4500 to 4500 given a

View File

@ -11,8 +11,7 @@ public:
AP_YawController(const AP_Vehicle::FixedWing &parms); AP_YawController(const AP_Vehicle::FixedWing &parms);
/* Do not allow copies */ /* Do not allow copies */
AP_YawController(const AP_YawController &other) = delete; CLASS_NO_COPY(AP_YawController);
AP_YawController &operator=(const AP_YawController&) = delete;
// return true if rate control or damping is enabled // return true if rate control or damping is enabled
bool enabled() const { return rate_control_enabled() || (_K_D > 0.0); } bool enabled() const { return rate_control_enabled() || (_K_D > 0.0); }

View File

@ -54,8 +54,7 @@ public:
AP_ADSB(); AP_ADSB();
/* Do not allow copies */ /* Do not allow copies */
AP_ADSB(const AP_ADSB &other) = delete; CLASS_NO_COPY(AP_ADSB);
AP_ADSB &operator=(const AP_ADSB&) = delete;
// get singleton instance // get singleton instance
static AP_ADSB *get_singleton(void) { static AP_ADSB *get_singleton(void) {

View File

@ -44,8 +44,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_AHRS_DCM(const AP_AHRS_DCM &other) = delete; CLASS_NO_COPY(AP_AHRS_DCM);
AP_AHRS_DCM &operator=(const AP_AHRS_DCM&) = delete;
// reset the current gyro drift estimate // reset the current gyro drift estimate
// should be called if gyro offsets are recalculated // should be called if gyro offsets are recalculated

View File

@ -47,8 +47,7 @@ public:
}; };
/* Do not allow copies */ /* Do not allow copies */
AP_AdvancedFailsafe(const AP_AdvancedFailsafe &other) = delete; CLASS_NO_COPY(AP_AdvancedFailsafe);
AP_AdvancedFailsafe &operator=(const AP_AdvancedFailsafe&) = delete;
// Constructor // Constructor
AP_AdvancedFailsafe() AP_AdvancedFailsafe()

View File

@ -40,8 +40,7 @@ public:
AP_Avoidance(class AP_ADSB &adsb); AP_Avoidance(class AP_ADSB &adsb);
/* Do not allow copies */ /* Do not allow copies */
AP_Avoidance(const AP_Avoidance &other) = delete; CLASS_NO_COPY(AP_Avoidance);
AP_Avoidance &operator=(const AP_Avoidance&) = delete;
// get singleton instance // get singleton instance
static AP_Avoidance *get_singleton() { static AP_Avoidance *get_singleton() {

View File

@ -46,8 +46,7 @@ public:
AP_Baro(); AP_Baro();
/* Do not allow copies */ /* Do not allow copies */
AP_Baro(const AP_Baro &other) = delete; CLASS_NO_COPY(AP_Baro);
AP_Baro &operator=(const AP_Baro&) = delete;
// get singleton // get singleton
static AP_Baro *get_singleton(void) { static AP_Baro *get_singleton(void) {

View File

@ -119,8 +119,7 @@ public:
AP_BattMonitor(uint32_t log_battery_bit, battery_failsafe_handler_fn_t battery_failsafe_handler_fn, const int8_t *failsafe_priorities); AP_BattMonitor(uint32_t log_battery_bit, battery_failsafe_handler_fn_t battery_failsafe_handler_fn, const int8_t *failsafe_priorities);
/* Do not allow copies */ /* Do not allow copies */
AP_BattMonitor(const AP_BattMonitor &other) = delete; CLASS_NO_COPY(AP_BattMonitor);
AP_BattMonitor &operator=(const AP_BattMonitor&) = delete;
static AP_BattMonitor *get_singleton() { static AP_BattMonitor *get_singleton() {
return _singleton; return _singleton;

View File

@ -9,8 +9,7 @@ public:
AP_BattMonitor_Params(void); AP_BattMonitor_Params(void);
/* Do not allow copies */ /* Do not allow copies */
AP_BattMonitor_Params(const AP_BattMonitor_Params &other) = delete; CLASS_NO_COPY(AP_BattMonitor_Params);
AP_BattMonitor_Params &operator=(const AP_BattMonitor_Params&) = delete;
// low voltage sources (used for BATT_LOW_TYPE parameter) // low voltage sources (used for BATT_LOW_TYPE parameter)
enum BattMonitor_LowVoltage_Source { enum BattMonitor_LowVoltage_Source {

View File

@ -47,8 +47,7 @@ public:
AP_BoardConfig(); AP_BoardConfig();
/* Do not allow copies */ /* Do not allow copies */
AP_BoardConfig(const AP_BoardConfig &other) = delete; CLASS_NO_COPY(AP_BoardConfig);
AP_BoardConfig &operator=(const AP_BoardConfig&) = delete;
// singleton support // singleton support
static AP_BoardConfig *get_singleton(void) { static AP_BoardConfig *get_singleton(void) {

View File

@ -37,8 +37,7 @@ public:
AP_Button(void); AP_Button(void);
/* Do not allow copies */ /* Do not allow copies */
AP_Button(const AP_Button &other) = delete; CLASS_NO_COPY(AP_Button);
AP_Button &operator=(const AP_Button&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -32,8 +32,7 @@ public:
AP_CANManager(); AP_CANManager();
/* Do not allow copies */ /* Do not allow copies */
AP_CANManager(const AP_CANManager &other) = delete; CLASS_NO_COPY(AP_CANManager);
AP_CANManager &operator=(const AP_CANManager&) = delete;
static AP_CANManager* get_singleton() static AP_CANManager* get_singleton()
{ {

View File

@ -27,8 +27,7 @@ public:
CANSensor(const char *driver_name, uint16_t stack_size=2048); CANSensor(const char *driver_name, uint16_t stack_size=2048);
/* Do not allow copies */ /* Do not allow copies */
CANSensor(const CANSensor &other) = delete; CLASS_NO_COPY(CANSensor);
CANSensor &operator=(const CANSensor&) = delete;
void init(uint8_t driver_index, bool enable_filters) override; void init(uint8_t driver_index, bool enable_filters) override;
bool add_interface(AP_HAL::CANIface* can_iface) override; bool add_interface(AP_HAL::CANIface* can_iface) override;

View File

@ -36,8 +36,7 @@ public:
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];
/* Do not allow copies */ /* Do not allow copies */
CANTester(const CANTester &other) = delete; CLASS_NO_COPY(CANTester);
CANTester &operator=(const CANTester&) = delete;
void init(uint8_t driver_index, bool enable_filters) override; void init(uint8_t driver_index, bool enable_filters) override;
bool add_interface(AP_HAL::CANIface* can_iface) override; bool add_interface(AP_HAL::CANIface* can_iface) override;

View File

@ -31,8 +31,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Camera(const AP_Camera &other) = delete; CLASS_NO_COPY(AP_Camera);
AP_Camera &operator=(const AP_Camera&) = delete;
// get singleton instance // get singleton instance
static AP_Camera *get_singleton() static AP_Camera *get_singleton()

View File

@ -50,8 +50,7 @@ public:
AP_RunCam(); AP_RunCam();
// do not allow copies // do not allow copies
AP_RunCam(const AP_RunCam &other) = delete; CLASS_NO_COPY(AP_RunCam);
AP_RunCam &operator=(const AP_RunCam &) = delete;
// get singleton instance // get singleton instance
static AP_RunCam *get_singleton() { static AP_RunCam *get_singleton() {

View File

@ -53,8 +53,7 @@ public:
~AP_ExpandingArrayGeneric(void); ~AP_ExpandingArrayGeneric(void);
/* Do not allow copies */ /* Do not allow copies */
AP_ExpandingArrayGeneric(const AP_ExpandingArrayGeneric &other) = delete; CLASS_NO_COPY(AP_ExpandingArrayGeneric);
AP_ExpandingArrayGeneric &operator=(const AP_ExpandingArrayGeneric&) = delete;
// current maximum number of items (using expand may increase this) // current maximum number of items (using expand may increase this)
uint16_t max_items() const { return chunk_size * chunk_count; } uint16_t max_items() const { return chunk_size * chunk_count; }
@ -88,8 +87,7 @@ public:
{} {}
/* Do not allow copies */ /* Do not allow copies */
AP_ExpandingArray(const AP_ExpandingArray<T> &other) = delete; CLASS_NO_COPY(AP_ExpandingArray);
AP_ExpandingArray<T> &operator=(const AP_ExpandingArray<T>&) = delete;
// allow use as an array for assigning to elements. no bounds checking is performed // allow use as an array for assigning to elements. no bounds checking is performed
T &operator[](uint16_t i) T &operator[](uint16_t i)

View File

@ -85,8 +85,7 @@ public:
Compass(); Compass();
/* Do not allow copies */ /* Do not allow copies */
Compass(const Compass &other) = delete; CLASS_NO_COPY(Compass);
Compass &operator=(const Compass&) = delete;
// get singleton instance // get singleton instance
static Compass *get_singleton() { static Compass *get_singleton() {

View File

@ -29,8 +29,7 @@ public:
AP_DEVO_Telem() {} AP_DEVO_Telem() {}
/* Do not allow copies */ /* Do not allow copies */
AP_DEVO_Telem(const AP_DEVO_Telem &other) = delete; CLASS_NO_COPY(AP_DEVO_Telem);
AP_DEVO_Telem &operator=(const AP_DEVO_Telem&) = delete;
void init(); void init();

View File

@ -48,8 +48,7 @@ public:
AP_ESC_Telem_Backend(); AP_ESC_Telem_Backend();
/* Do not allow copies */ /* Do not allow copies */
AP_ESC_Telem_Backend(const AP_ESC_Telem_Backend &other) = delete; CLASS_NO_COPY(AP_ESC_Telem_Backend);
AP_ESC_Telem_Backend &operator=(const AP_ESC_Telem_Backend&) = delete;
protected: protected:
// callback to update the rpm in the frontend, should be called by the driver when new data is available // callback to update the rpm in the frontend, should be called by the driver when new data is available

View File

@ -67,8 +67,7 @@ public:
AP_FETtecOneWire(); AP_FETtecOneWire();
/// Do not allow copies /// Do not allow copies
AP_FETtecOneWire(const AP_FETtecOneWire &other) = delete; CLASS_NO_COPY(AP_FETtecOneWire);
AP_FETtecOneWire &operator=(const AP_FETtecOneWire&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -12,8 +12,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Frsky_SPort(const AP_Frsky_SPort &other) = delete; CLASS_NO_COPY(AP_Frsky_SPort);
AP_Frsky_SPort &operator=(const AP_Frsky_SPort&) = delete;
void send() override; void send() override;
// send an sport packet by responding to the specified polled sensor // send an sport packet by responding to the specified polled sensor

View File

@ -27,8 +27,7 @@ public:
~AP_Frsky_Telem(); ~AP_Frsky_Telem();
/* Do not allow copies */ /* Do not allow copies */
AP_Frsky_Telem(const AP_Frsky_Telem &other) = delete; CLASS_NO_COPY(AP_Frsky_Telem);
AP_Frsky_Telem &operator=(const AP_Frsky_Telem&) = delete;
// init - perform required initialisation // init - perform required initialisation
bool init(bool use_external_data=false); bool init(bool use_external_data=false);

View File

@ -92,8 +92,7 @@ public:
AP_GPS(); AP_GPS();
/* Do not allow copies */ /* Do not allow copies */
AP_GPS(const AP_GPS &other) = delete; CLASS_NO_COPY(AP_GPS);
AP_GPS &operator=(const AP_GPS&) = delete;
static AP_GPS *get_singleton() { static AP_GPS *get_singleton() {
return _singleton; return _singleton;

View File

@ -10,8 +10,7 @@ public:
MovingBase(void); MovingBase(void);
/* Do not allow copies */ /* Do not allow copies */
MovingBase(const MovingBase &other) = delete; CLASS_NO_COPY(MovingBase);
MovingBase &operator=(const MovingBase&) = delete;
enum class Type : int8_t { enum class Type : int8_t {
RelativeToAlternateInstance = 0, RelativeToAlternateInstance = 0,

View File

@ -28,8 +28,7 @@ public:
AP_Generator(); AP_Generator();
// Do not allow copies // Do not allow copies
AP_Generator(const AP_Generator &other) = delete; CLASS_NO_COPY(AP_Generator);
AP_Generator &operator=(const AP_Generator&) = delete;
static AP_Generator* get_singleton(); static AP_Generator* get_singleton();

View File

@ -27,8 +27,8 @@ class AP_Gripper {
public: public:
AP_Gripper(); AP_Gripper();
AP_Gripper(const AP_Gripper &other) = delete; /* Do not allow copies */
AP_Gripper &operator=(const AP_Gripper&) = delete; CLASS_NO_COPY(AP_Gripper);
static AP_Gripper *get_singleton(); static AP_Gripper *get_singleton();
static AP_Gripper *_singleton; static AP_Gripper *_singleton;

View File

@ -44,8 +44,7 @@ public:
AP_GyroFFT(); AP_GyroFFT();
// Do not allow copies // Do not allow copies
AP_GyroFFT(const AP_GyroFFT &other) = delete; CLASS_NO_COPY(AP_GyroFFT);
AP_GyroFFT &operator=(const AP_GyroFFT&) = delete;
void init(uint16_t loop_rate_hz); void init(uint16_t loop_rate_hz);
@ -360,4 +359,4 @@ namespace AP {
AP_GyroFFT *fft(); AP_GyroFFT *fft();
}; };
#endif // HAL_GYROFFT_ENABLED #endif // HAL_GYROFFT_ENABLED

View File

@ -12,8 +12,7 @@ public:
Semaphore() {} Semaphore() {}
// do not allow copying // do not allow copying
Semaphore(const Semaphore &other) = delete; CLASS_NO_COPY(Semaphore);
Semaphore &operator=(const Semaphore&) = delete;
virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED = 0 ; virtual bool take(uint32_t timeout_ms) WARN_IF_UNUSED = 0 ;
virtual bool take_nonblocking() WARN_IF_UNUSED = 0; virtual bool take_nonblocking() WARN_IF_UNUSED = 0;

View File

@ -21,8 +21,7 @@ private:
public: public:
UARTDriver() {} UARTDriver() {}
/* Do not allow copies */ /* Do not allow copies */
UARTDriver(const UARTDriver &other) = delete; CLASS_NO_COPY(UARTDriver);
UARTDriver &operator=(const UARTDriver&) = delete;
// begin() implicitly clears rx/tx buffers, even if the port was already open (unless the UART is the console UART) // begin() implicitly clears rx/tx buffers, even if the port was already open (unless the UART is the console UART)
virtual void begin(uint32_t baud) = 0; virtual void begin(uint32_t baud) = 0;

View File

@ -31,8 +31,7 @@ class ChibiOS::SoftSigReaderInt {
public: public:
SoftSigReaderInt(); SoftSigReaderInt();
/* Do not allow copies */ /* Do not allow copies */
SoftSigReaderInt(const SoftSigReaderInt &other) = delete; CLASS_NO_COPY(SoftSigReaderInt);
SoftSigReaderInt &operator=(const SoftSigReaderInt&) = delete;
// get singleton // get singleton
static SoftSigReaderInt *get_singleton(void) static SoftSigReaderInt *get_singleton(void)

View File

@ -33,8 +33,7 @@ public:
UARTDriver(uint8_t serial_num); UARTDriver(uint8_t serial_num);
/* Do not allow copies */ /* Do not allow copies */
UARTDriver(const UARTDriver &other) = delete; CLASS_NO_COPY(UARTDriver);
UARTDriver &operator=(const UARTDriver&) = delete;
void begin(uint32_t b) override; void begin(uint32_t b) override;
void begin_locked(uint32_t b, uint32_t write_key) override; void begin_locked(uint32_t b, uint32_t write_key) override;

View File

@ -41,9 +41,9 @@ class SoftSigReaderInt
public: public:
SoftSigReaderInt(); SoftSigReaderInt();
~SoftSigReaderInt(); ~SoftSigReaderInt();
/* Do not allow copies */ /* Do not allow copies */
SoftSigReaderInt(const SoftSigReaderInt &other) = delete; CLASS_NO_COPY(SoftSigReaderInt);
SoftSigReaderInt &operator=(const SoftSigReaderInt&) = delete;
// get singleton // get singleton
static SoftSigReaderInt *get_instance(void) static SoftSigReaderInt *get_instance(void)

View File

@ -26,8 +26,7 @@ public:
AP_Hott_Telem(); AP_Hott_Telem();
/* Do not allow copies */ /* Do not allow copies */
AP_Hott_Telem(const AP_Hott_Telem &other) = delete; CLASS_NO_COPY(AP_Hott_Telem);
AP_Hott_Telem &operator=(const AP_Hott_Telem&) = delete;
static AP_Hott_Telem *get_singleton(void) { static AP_Hott_Telem *get_singleton(void) {
return singleton; return singleton;

View File

@ -84,8 +84,7 @@ public:
AP_InertialSensor(); AP_InertialSensor();
/* Do not allow copies */ /* Do not allow copies */
AP_InertialSensor(const AP_InertialSensor &other) = delete; CLASS_NO_COPY(AP_InertialSensor);
AP_InertialSensor &operator=(const AP_InertialSensor&) = delete;
static AP_InertialSensor *get_singleton(); static AP_InertialSensor *get_singleton();

View File

@ -39,8 +39,7 @@ public:
AP_KDECAN(); AP_KDECAN();
/* Do not allow copies */ /* Do not allow copies */
AP_KDECAN(const AP_KDECAN &other) = delete; CLASS_NO_COPY(AP_KDECAN);
AP_KDECAN &operator=(const AP_KDECAN&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -30,8 +30,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_L1_Control(const AP_L1_Control &other) = delete; CLASS_NO_COPY(AP_L1_Control);
AP_L1_Control &operator=(const AP_L1_Control&) = delete;
/* see AP_Navigation.h for the definitions and units of these /* see AP_Navigation.h for the definitions and units of these
* functions */ * functions */

View File

@ -32,8 +32,7 @@ public:
AP_LTM_Telem() {} AP_LTM_Telem() {}
/* Do not allow copies */ /* Do not allow copies */
AP_LTM_Telem(const AP_LTM_Telem &other) = delete; CLASS_NO_COPY(AP_LTM_Telem);
AP_LTM_Telem &operator=(const AP_LTM_Telem&) = delete;
// init - perform required initialisation // init - perform required initialisation
void init(); void init();

View File

@ -45,8 +45,7 @@ public:
update_flight_stage_fn_t _update_flight_stage_fn); update_flight_stage_fn_t _update_flight_stage_fn);
/* Do not allow copies */ /* Do not allow copies */
AP_Landing(const AP_Landing &other) = delete; CLASS_NO_COPY(AP_Landing);
AP_Landing &operator=(const AP_Landing&) = delete;
// NOTE: make sure to update is_type_valid() // NOTE: make sure to update is_type_valid()

View File

@ -20,8 +20,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_LandingGear(const AP_LandingGear &other) = delete; CLASS_NO_COPY(AP_LandingGear);
AP_LandingGear &operator=(const AP_LandingGear&) = delete;
// get singleton instance // get singleton instance
static AP_LandingGear *get_singleton(void) { static AP_LandingGear *get_singleton(void) {

View File

@ -17,8 +17,7 @@ public:
AP_LeakDetector(); AP_LeakDetector();
/* Do not allow copies */ /* Do not allow copies */
AP_LeakDetector(const AP_LeakDetector &other) = delete; CLASS_NO_COPY(AP_LeakDetector);
AP_LeakDetector &operator=(const AP_LeakDetector&) = delete;
struct LeakDetector_State { struct LeakDetector_State {
uint8_t instance; uint8_t instance;

View File

@ -244,8 +244,7 @@ public:
AP_Logger(const AP_Int32 &log_bitmask); AP_Logger(const AP_Int32 &log_bitmask);
/* Do not allow copies */ /* Do not allow copies */
AP_Logger(const AP_Logger &other) = delete; CLASS_NO_COPY(AP_Logger);
AP_Logger &operator=(const AP_Logger&) = delete;
// get singleton instance // get singleton instance
static AP_Logger *get_singleton(void) { static AP_Logger *get_singleton(void) {

View File

@ -44,8 +44,7 @@ public:
AP_MSP(); AP_MSP();
/* Do not allow copies */ /* Do not allow copies */
AP_MSP(const AP_MSP &other) = delete; CLASS_NO_COPY(AP_MSP);
AP_MSP &operator=(const AP_MSP&) = delete;
// User settable parameters // User settable parameters
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -383,8 +383,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Mission(const AP_Mission &other) = delete; CLASS_NO_COPY(AP_Mission);
AP_Mission &operator=(const AP_Mission&) = delete;
// mission state enumeration // mission state enumeration
enum mission_state { enum mission_state {

View File

@ -71,8 +71,7 @@ public:
AP_Mount(); AP_Mount();
/* Do not allow copies */ /* Do not allow copies */
AP_Mount(const AP_Mount &other) = delete; CLASS_NO_COPY(AP_Mount);
AP_Mount &operator=(const AP_Mount&) = delete;
// get singleton instance // get singleton instance
static AP_Mount *get_singleton() { static AP_Mount *get_singleton() {

View File

@ -12,8 +12,7 @@ public:
AP_Mount_Params(void); AP_Mount_Params(void);
/* Do not allow copies */ /* Do not allow copies */
AP_Mount_Params(const AP_Mount_Params &other) = delete; CLASS_NO_COPY(AP_Mount_Params);
AP_Mount_Params &operator=(const AP_Mount_Params&) = delete;
AP_Int8 type; // mount type (see MountType enum) AP_Int8 type; // mount type (see MountType enum)
AP_Int8 default_mode; // default mode on startup and when control is returned from autopilot AP_Int8 default_mode; // default mode on startup and when control is returned from autopilot

View File

@ -12,8 +12,7 @@ public:
AP_NavEKF_Source(); AP_NavEKF_Source();
/* Do not allow copies */ /* Do not allow copies */
AP_NavEKF_Source(const AP_NavEKF_Source &other) = delete; CLASS_NO_COPY(AP_NavEKF_Source);
AP_NavEKF_Source &operator=(const AP_NavEKF_Source&) = delete;
enum class SourceXY : uint8_t { enum class SourceXY : uint8_t {
NONE = 0, NONE = 0,

View File

@ -37,8 +37,7 @@ public:
NavEKF2(); NavEKF2();
/* Do not allow copies */ /* Do not allow copies */
NavEKF2(const NavEKF2 &other) = delete; CLASS_NO_COPY(NavEKF2);
NavEKF2 &operator=(const NavEKF2&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -35,8 +35,7 @@ public:
NavEKF3(); NavEKF3();
/* Do not allow copies */ /* Do not allow copies */
NavEKF3(const NavEKF3 &other) = delete; CLASS_NO_COPY(NavEKF3);
NavEKF3 &operator=(const NavEKF3&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];
static const struct AP_Param::GroupInfo var_info2[]; static const struct AP_Param::GroupInfo var_info2[];

View File

@ -44,8 +44,7 @@ public:
AP_Notify(); AP_Notify();
/* Do not allow copies */ /* Do not allow copies */
AP_Notify(const AP_Notify &other) = delete; CLASS_NO_COPY(AP_Notify);
AP_Notify &operator=(const AP_Notify&) = delete;
// get singleton instance // get singleton instance
static AP_Notify *get_singleton(void) { static AP_Notify *get_singleton(void) {

View File

@ -24,8 +24,7 @@ public:
ScriptingLED(); ScriptingLED();
/* Do not allow copies */ /* Do not allow copies */
ScriptingLED(const AP_Notify &other) = delete; CLASS_NO_COPY(ScriptingLED);
ScriptingLED &operator=(const AP_Notify&) = delete;
// get singleton instance // get singleton instance
static ScriptingLED *get_singleton(void) { static ScriptingLED *get_singleton(void) {

View File

@ -34,8 +34,7 @@ public:
AP_ONVIF(); AP_ONVIF();
/* Do not allow copies */ /* Do not allow copies */
AP_ONVIF(const AP_ONVIF &other) = delete; CLASS_NO_COPY(AP_ONVIF);
AP_ONVIF &operator=(const AP_ONVIF&) = delete;
// Start ONVIF client with username, password and service host url // Start ONVIF client with username, password and service host url
bool start(const char *user, const char *pass, const char *httphostname); bool start(const char *user, const char *pass, const char *httphostname);

View File

@ -460,8 +460,7 @@ public:
AP_OSD(); AP_OSD();
/* Do not allow copies */ /* Do not allow copies */
AP_OSD(const AP_OSD &other) = delete; CLASS_NO_COPY(AP_OSD);
AP_OSD &operator=(const AP_OSD&) = delete;
// get singleton instance // get singleton instance
static AP_OSD *get_singleton() static AP_OSD *get_singleton()

View File

@ -49,8 +49,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_Parachute(const AP_Parachute &other) = delete; CLASS_NO_COPY(AP_Parachute);
AP_Parachute &operator=(const AP_Parachute&) = delete;
/// enabled - enable or disable parachute release /// enabled - enable or disable parachute release
void enabled(bool on_off); void enabled(bool on_off);

View File

@ -73,8 +73,7 @@ public:
}; };
/* Do not allow copies */ /* Do not allow copies */
AP_PiccoloCAN(const AP_PiccoloCAN &other) = delete; CLASS_NO_COPY(AP_PiccoloCAN);
AP_PiccoloCAN &operator=(const AP_PiccoloCAN&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -37,8 +37,8 @@ public:
AP_Proximity(); AP_Proximity();
AP_Proximity(const AP_Proximity &other) = delete; /* Do not allow copies */
AP_Proximity &operator=(const AP_Proximity) = delete; CLASS_NO_COPY(AP_Proximity);
// Proximity driver types // Proximity driver types
enum class Type { enum class Type {

View File

@ -14,8 +14,7 @@ public:
AP_Proximity_Params(void); AP_Proximity_Params(void);
/* Do not allow copies */ /* Do not allow copies */
AP_Proximity_Params(const AP_Proximity_Params &other) = delete; CLASS_NO_COPY(AP_Proximity_Params);
AP_Proximity_Params &operator=(const AP_Proximity_Params&) = delete;
AP_Int8 type; // type of sensor AP_Int8 type; // type of sensor
AP_Int8 orientation; // orientation (e.g. right-side-up or upside-down) AP_Int8 orientation; // orientation (e.g. right-side-up or upside-down)

View File

@ -9,8 +9,7 @@ public:
RCMapper(); RCMapper();
/* Do not allow copies */ /* Do not allow copies */
RCMapper(const RCMapper &other) = delete; CLASS_NO_COPY(RCMapper);
RCMapper &operator=(const RCMapper&) = delete;
// get singleton instance // get singleton instance
static RCMapper *get_singleton() static RCMapper *get_singleton()

View File

@ -39,8 +39,7 @@ public:
~AP_CRSF_Telem() override; ~AP_CRSF_Telem() override;
/* Do not allow copies */ /* Do not allow copies */
AP_CRSF_Telem(const AP_CRSF_Telem &other) = delete; CLASS_NO_COPY(AP_CRSF_Telem);
AP_CRSF_Telem &operator=(const AP_CRSF_Telem&) = delete;
// init - perform required initialisation // init - perform required initialisation
virtual bool init() override; virtual bool init() override;

View File

@ -31,8 +31,7 @@ public:
virtual ~AP_RCTelemetry() {}; virtual ~AP_RCTelemetry() {};
/* Do not allow copies */ /* Do not allow copies */
AP_RCTelemetry(const AP_RCTelemetry &other) = delete; CLASS_NO_COPY(AP_RCTelemetry);
AP_RCTelemetry &operator=(const AP_RCTelemetry&) = delete;
// add statustext message to message queue // add statustext message to message queue
virtual void queue_message(MAV_SEVERITY severity, const char *text); virtual void queue_message(MAV_SEVERITY severity, const char *text);

View File

@ -50,8 +50,7 @@ public:
~AP_Spektrum_Telem() override; ~AP_Spektrum_Telem() override;
/* Do not allow copies */ /* Do not allow copies */
AP_Spektrum_Telem(const AP_Spektrum_Telem &other) = delete; CLASS_NO_COPY(AP_Spektrum_Telem);
AP_Spektrum_Telem &operator=(const AP_Spektrum_Telem&) = delete;
// init - perform required initialisation // init - perform required initialisation
virtual bool init() override; virtual bool init() override;

View File

@ -33,8 +33,7 @@ public:
AP_RSSI(); AP_RSSI();
/* Do not allow copies */ /* Do not allow copies */
AP_RSSI(const AP_RSSI &other) = delete; CLASS_NO_COPY(AP_RSSI);
AP_RSSI &operator=(const AP_RSSI&) = delete;
// destructor // destructor
~AP_RSSI(void); ~AP_RSSI(void);

View File

@ -42,8 +42,7 @@ public:
AP_Rally(); AP_Rally();
/* Do not allow copies */ /* Do not allow copies */
AP_Rally(const AP_Rally &other) = delete; CLASS_NO_COPY(AP_Rally);
AP_Rally &operator=(const AP_Rally&) = delete;
// data handling // data handling
bool get_rally_point_with_index(uint8_t i, RallyLocation &ret) const; bool get_rally_point_with_index(uint8_t i, RallyLocation &ret) const;

View File

@ -62,8 +62,7 @@ public:
RangeFinder(); RangeFinder();
/* Do not allow copies */ /* Do not allow copies */
RangeFinder(const RangeFinder &other) = delete; CLASS_NO_COPY(RangeFinder);
RangeFinder &operator=(const RangeFinder&) = delete;
// RangeFinder driver types // RangeFinder driver types
enum class Type { enum class Type {

View File

@ -10,8 +10,7 @@ public:
AP_RangeFinder_Params(void); AP_RangeFinder_Params(void);
/* Do not allow copies */ /* Do not allow copies */
AP_RangeFinder_Params(const AP_RangeFinder_Params &other) = delete; CLASS_NO_COPY(AP_RangeFinder_Params);
AP_RangeFinder_Params &operator=(const AP_RangeFinder_Params&) = delete;
AP_Vector3f pos_offset; // position offset in body frame AP_Vector3f pos_offset; // position offset in body frame
AP_Float scaling; AP_Float scaling;

View File

@ -20,8 +20,7 @@ public:
AP_Relay(); AP_Relay();
/* Do not allow copies */ /* Do not allow copies */
AP_Relay(const AP_Relay &other) = delete; CLASS_NO_COPY(AP_Relay);
AP_Relay &operator=(const AP_Relay&) = delete;
// setup the relay pin // setup the relay pin
void init(); void init();

View File

@ -34,8 +34,7 @@ public:
AP_RobotisServo(); AP_RobotisServo();
/* Do not allow copies */ /* Do not allow copies */
AP_RobotisServo(const AP_RobotisServo &other) = delete; CLASS_NO_COPY(AP_RobotisServo);
AP_RobotisServo &operator=(const AP_RobotisServo&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -15,8 +15,7 @@ public:
AP_SBusOut(); AP_SBusOut();
/* Do not allow copies */ /* Do not allow copies */
AP_SBusOut(const AP_SBusOut &other) = delete; CLASS_NO_COPY(AP_SBusOut);
AP_SBusOut &operator=(const AP_SBusOut&) = delete;
static const struct AP_Param::GroupInfo var_info[]; static const struct AP_Param::GroupInfo var_info[];

View File

@ -79,8 +79,7 @@ public:
AP_Scheduler(); AP_Scheduler();
/* Do not allow copies */ /* Do not allow copies */
AP_Scheduler(const AP_Scheduler &other) = delete; CLASS_NO_COPY(AP_Scheduler);
AP_Scheduler &operator=(const AP_Scheduler&) = delete;
static AP_Scheduler *get_singleton(); static AP_Scheduler *get_singleton();
static AP_Scheduler *_singleton; static AP_Scheduler *_singleton;

View File

@ -23,8 +23,7 @@ public:
}; };
/* Do not allow copies */ /* Do not allow copies */
PerfInfo(const PerfInfo &other) = delete; CLASS_NO_COPY(PerfInfo);
PerfInfo &operator=(const PerfInfo&) = delete;
void reset(); void reset();
void ignore_this_loop(); void ignore_this_loop();

View File

@ -34,8 +34,7 @@ public:
AP_Scripting(); AP_Scripting();
/* Do not allow copies */ /* Do not allow copies */
AP_Scripting(const AP_Scripting &other) = delete; CLASS_NO_COPY(AP_Scripting);
AP_Scripting &operator=(const AP_Scripting&) = delete;
void init(void); void init(void);

View File

@ -120,8 +120,7 @@ public:
AP_SerialManager(); AP_SerialManager();
/* Do not allow copies */ /* Do not allow copies */
AP_SerialManager(const AP_SerialManager &other) = delete; CLASS_NO_COPY(AP_SerialManager);
AP_SerialManager &operator=(const AP_SerialManager&) = delete;
enum SerialProtocol { enum SerialProtocol {
SerialProtocol_None = -1, SerialProtocol_None = -1,

View File

@ -18,8 +18,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_ServoRelayEvents(const AP_ServoRelayEvents &other) = delete; CLASS_NO_COPY(AP_ServoRelayEvents);
AP_ServoRelayEvents &operator=(const AP_ServoRelayEvents&) = delete;
// get singleton instance // get singleton instance
static AP_ServoRelayEvents *get_singleton() { static AP_ServoRelayEvents *get_singleton() {

View File

@ -36,8 +36,7 @@ public:
} }
/* Do not allow copies */ /* Do not allow copies */
AP_TECS(const AP_TECS &other) = delete; CLASS_NO_COPY(AP_TECS);
AP_TECS &operator=(const AP_TECS&) = delete;
// Update of the estimated height and height rate internal state // Update of the estimated height and height rate internal state
// Update of the inertial speed rate internal state // Update of the inertial speed rate internal state

View File

@ -36,8 +36,7 @@ public:
void update(void); void update(void);
/* Do not allow copies */ /* Do not allow copies */
AP_TempCalibration(const AP_TempCalibration &other) = delete; CLASS_NO_COPY(AP_TempCalibration);
AP_TempCalibration &operator=(const AP_TempCalibration&) = delete;
enum { enum {
TC_DISABLED = 0, TC_DISABLED = 0,

View File

@ -103,8 +103,7 @@ public:
// Do not allow copies // Do not allow copies
AP_UAVCAN_DNA_Server(const AP_UAVCAN_DNA_Server &other) = delete; CLASS_NO_COPY(AP_UAVCAN_DNA_Server);
AP_UAVCAN_DNA_Server &operator=(const AP_UAVCAN_DNA_Server&) = delete;
//Initialises publisher and Server Record for specified uavcan driver //Initialises publisher and Server Record for specified uavcan driver
bool init(); bool init();

Some files were not shown because too many files have changed in this diff Show More