This PR replaces and completes the limiting functions that were present in the torque controllers.
These have been placed in the TCMUX since they should be applied to all controllers and all drivetrain requests.
The Power limit is a simple powerlimit akin to the one run on HT07. When calculated mechanical power is above the predetermined 63kw mechanical power limit it will scale down all motor torques to be below the 63kw limit while preserving ratios as determined by the torque controllers.
The torque limit works in a similar manner but takes the average torque value across all motors. This will effectively limit the torque output of our motors so that the average torque of all motors at any point in time is the same as the dashboard/ecu torque limit.
The negative speedtest limit function just takes the max of speed setpoint values above 0, preventing the car from commanding backwards motion
This PR replaces and completes the limiting functions that were present in the torque controllers.
These have been placed in the TCMUX since they should be applied to all controllers and all drivetrain requests.
The Power limit is a simple powerlimit akin to the one run on HT07. When calculated mechanical power is above the predetermined 63kw mechanical power limit it will scale down all motor torques to be below the 63kw limit while preserving ratios as determined by the torque controllers.
The torque limit works in a similar manner but takes the average torque value across all motors. This will effectively limit the torque output of our motors so that the average torque of all motors at any point in time is the same as the dashboard/ecu torque limit.
The negative speedtest limit function just takes the max of speed setpoint values above 0, preventing the car from commanding backwards motion
closes #66 closes #71