define or delete missing move/copy ctors

This commit is contained in:
Leonetienne
2025-12-14 19:28:41 +01:00
parent fd218f0358
commit 0405df14fe
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -8,6 +8,8 @@ class AdafruitPWMBoard
{ {
public: public:
AdafruitPWMBoard(const uint8_t addr, const uint8_t pwmFreq); AdafruitPWMBoard(const uint8_t addr, const uint8_t pwmFreq);
AdafruitPWMBoard(const AdafruitPWMBoard& other) = delete;
AdafruitPWMBoard(AdafruitPWMBoard&&) noexcept = default;
Adafruit_PWMServoDriver& get() noexcept { return hwif; }; Adafruit_PWMServoDriver& get() noexcept { return hwif; };
const Adafruit_PWMServoDriver& get() const noexcept { return hwif; }; const Adafruit_PWMServoDriver& get() const noexcept { return hwif; };
+2
View File
@@ -19,6 +19,8 @@ class AdafruitServoMotor : public RangedMotor
const uint16_t minPulseLength = 125, const uint16_t minPulseLength = 125,
const uint16_t maxPulseLength = 625 const uint16_t maxPulseLength = 625
) noexcept; ) noexcept;
AdafruitServoMotor(const AdafruitServoMotor& other) = delete;
AdafruitServoMotor(AdafruitServoMotor&& other) noexcept = default;
// Returns true if the motion is accepted, false if it is outside of safe bounds. // Returns true if the motion is accepted, false if it is outside of safe bounds.
// If out of safe bounds, maximum or minimun safe value will be assumen // If out of safe bounds, maximum or minimun safe value will be assumen