got motor running
This commit is contained in:
@@ -15,12 +15,13 @@ class AdafruitServoMotor : public RangedMotor
|
||||
const float minSafeAngle,
|
||||
const float maxSafeAngle,
|
||||
const float specRangeDeg, // 180 for a 180-deg-servo, 270 for a 270-deg-servo, etc ...
|
||||
const float initialPosition = 0,
|
||||
const uint16_t minPulseLength = 125,
|
||||
const uint16_t maxPulseLength = 125,
|
||||
const float initialPosition = 0
|
||||
const uint16_t maxPulseLength = 625
|
||||
) noexcept;
|
||||
|
||||
// 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
|
||||
bool moveTo(const float target) noexcept override;
|
||||
float getPosition() const noexcept override { return hardwareAngleToVirtualAngle(currentHardwarePosition); };
|
||||
|
||||
@@ -34,6 +35,6 @@ class AdafruitServoMotor : public RangedMotor
|
||||
float currentHardwarePosition = 0;
|
||||
float lastCommittedHardwarePosition = 0;
|
||||
float specRangeDeg;
|
||||
const uint8_t minPulseLength;
|
||||
const uint8_t maxPulseLength;
|
||||
const uint16_t minPulseLength;
|
||||
const uint16_t maxPulseLength;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user