mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-29 11:30:34 +08:00
commander: add COM_MOT_TEST_EN parameter to enable/disable motor testing
This commit is contained in:
@@ -1144,6 +1144,10 @@ Commander::handle_command_motor_test(const vehicle_command_s &cmd)
|
||||
return vehicle_command_s::VEHICLE_CMD_RESULT_DENIED;
|
||||
}
|
||||
|
||||
if (_param_com_mot_test_en.get() != 1) {
|
||||
return vehicle_command_s::VEHICLE_CMD_RESULT_DENIED;
|
||||
}
|
||||
|
||||
test_motor_s test_motor{};
|
||||
test_motor.timestamp = hrt_absolute_time();
|
||||
test_motor.motor_number = (int)(cmd.param1 + 0.5f) - 1;
|
||||
|
||||
Reference in New Issue
Block a user