Class DoubleDjiMotor

Inheritance Relationships

Base Type

Class Documentation

class DoubleDjiMotor : public tap::motor::MotorInterface

Wraps two motors assumed to be connected to a rigid drive shaft. Assumes that the two motors are identical with the same gear ratio and are dji motors with the same communication and control interface (for example, two M3508’s, two 6020’s, etc.).

Public Functions

DoubleDjiMotor(Drivers *drivers, MotorId desMotorIdentifierOne, MotorId desMotorIdentifierTwo, tap::can::CanBus motorCanBusOne, tap::can::CanBus motorCanBusTwo, bool isInvertedOne, bool isInvertedTwo, const char *nameOne, const char *nameTwo, uint16_t encWrapped = DjiMotor::ENC_RESOLUTION / 2, int64_t encRevolutions = 0)
virtual void initialize() override
virtual float getPositionUnwrapped() const override
virtual float getPositionWrapped() const override
virtual int64_t getEncoderUnwrapped() const override
virtual uint16_t getEncoderWrapped() const override
virtual void resetEncoderValue() override
virtual void setDesiredOutput(int32_t desiredOutput) override
virtual bool isMotorOnline() const override
virtual int16_t getOutputDesired() const override
virtual int8_t getTemperature() const override
virtual int16_t getTorque() const override
virtual int16_t getShaftRPM() const override

Protected Attributes

DjiMotor motorOne
DjiMotor motorTwo