#include "../Inc/Systems/Controller/TorqueControl.h"
#include "test.h"
Go to the source code of this file.
◆ MAX_TORQUE
◆ TORQUE_DO
#define TORQUE_DO |
( |
|
torque, |
|
|
|
desired |
|
) |
| |
Value:
setActualTorque(&tc, torque); \
setDesiredTorque(&tc, desired); \
updateTorqueControl(&tc); \
TorqueStatus checkTorqueLimits(TorqueControl *tc)
Checks if the actual torque is within the defined limits and desired range.
Definition at line 6 of file TorqueControlActuatorTest.c.
◆ torque_control_main()
void torque_control_main |
( |
| ) |
|
Definition at line 14 of file TorqueControlActuatorTest.c.
14 {
19 })
20
23 ASSERT(tc.status ==
TORQUE_OK, "status is expected", "status is not expected");
24 })
25
26 TEST(update_below_desired, {
28 ASSERT(tc.status ==
TORQUE_OK, "status is expected", "status is not expected");
29 })
30
31 TEST(update_above_desired, {
33 ASSERT(tc.status ==
TORQUE_OK, "status is expected", "status is not expected");
34 })
35
36 TEST(update_over_limit, {
39 })
40
41 TEST(update_negative_torque, {
44 })
45
46 TEST(update_sensor_error, {
49 })
50}
#define TORQUE_DO(torque, desired)
void initTorqueControl(TorqueControl *tc, int hz, float maxTorque)
Initializes the Torque Control Actuator with initial settings.
#define ASSERT(BOOL, OK, ERR)