3#include "../../CAN/CAN.h"
4#include "../../CAN/CANMotor.h"
5#include "../../CAN/CANUtils.h"
47 std::optional<can::motor::motormode_t> motor_mode;
48 double positive_scale;
49 double negative_scale;
_Tp power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
base_motor(robot::types::motorid_t motor, bool hasPosSensor)
Constructor for base motor.
Definition base_motor.cpp:6
types::DataPoint< int32_t > getMotorPos() const override
Get the last reported position of the specified motor.
Definition can_motor.cpp:31
can::deviceserial_t getMotorSerial()
Returns the motor's serial id.
Definition can_motor.cpp:50
void setMotorPower(double power) override
Set the PWM command of the motor.
Definition can_motor.cpp:10
can_motor(robot::types::motorid_t motor, bool hasPosSensor, can::deviceserial_t serial, can::devicegroup_t group, double pos_pwm_scale, double neg_pwm_scale)
Constructor for can motor.
Definition can_motor.cpp:4
void setMotorVel(int32_t targetVel) override
Sets the velocity of the motor.
Definition can_motor.cpp:35
void setMotorPos(int32_t targetPos) override
Set the target position of the motor.
Definition can_motor.cpp:22
Represents data measured using a sensor at a given time.
Definition data.h:182
motormode_t
The possible motor modes.
Definition CANMotor.h:19
devicegroup_t
The possible device group codes.
Definition CANUtils.h:20
uint8_t deviceserial_t
The type of the device serial number.
Definition CANUtils.h:67
motorid_t
The motors on the robot.
Definition data.h:57
Collection of functions for manipulating a motor.
Definition ArduPilotInterface.cpp:27