Motivation
The motor controllers (MC) are a third party board with a custom CAN communication protocol. The MC must send and receive messages to the driver controls (DC), however because the MC protocol is strict and thorough it requires abstraction from the rest of the system. The motor controller interface (MCI) handles this abstraction.
Components
Moter Controller (MC)
MCI must transmit to MC every 250ms or else the MC will shut down. This will be a periodic (200ms) task.
MCI will receive updates on measurements of voltage and current, these will be transmitted to DC.
Driver Controls (DC)
MCI will receive can msgs from DC requesting to set the car’s drive state. MCI then sends the message to MC.
MCI will transmit voltage and current updates to DC.
There will be two tasks
one talking to MC
receives notifications from DC, usingnotify_wait
to wait for an event or 200ms between MC transmissions.
one talking to DC