23#ifndef __ECU_MOTORCONTROL_H__
24#define __ECU_MOTORCONTROL_H__
39#define CONF_MAXIMUM_SWITCHING_SPEED 5
73void sendTorque(uint32_t MC_ADD,
int torque,
bool direction,
bool enableBit);
Make one ECU tell the other it is alive.
Methods used to more easily interface with RMS Motor controllers over CAN bus.
void sendTorque(uint32_t MC_ADD, int torque, bool direction, bool enableBit)
Send a raw torque command to a MC.
void setTorque(int pedal, int brake, int steer)
Calculate and set the torque of both MCs.
int getLastSteerValue()
Get the last steer value that was internally used.
int getLastBrakeValue()
Get the last brake value that was internally used.
void setDirection(bool runForward)
Set the direction of the motors.
void setupBuffers(void)
Only initialize MC buffers, called by MC::setup.
bool isForward(void)
Get whether the motors will spin forward.
int getLastTorqueValue(bool mc0)
Get the last torque percent value sent to a MC.
int getLastPedalValue(void)
Get the last pedal value that was internally used.
int32_t motorSpeed(int motor=-1)
Get the avg motorspeed.
void enableMotorBeating(bool enable)
Start MC heartbeat function, establishing a connection with the MCs.
void clearFaults(void)
Clear MC faults by sending a clear fault command.
void setup(void)
Initialize MC heartbeat function and clear faults, if any.