Rover: reject position targets if acceleration supplied
Replaces https://github.com/ArduPilot/ardupilot/pull/26955/files which simply factored the check out.
This both factors the check out and stops us accepting the position target if acceleration is set.
We should probably also reject if other bits and pieces are set.
Thanks @peterbarker for this. I guess this has been tested in some way?
Board AP_Periph blimp bootloader copter heli iofirmware plane rover sub
CubeOrange-periph-heavy *
Durandal * * * * * -24 *
Hitec-Airspeed *
KakuteH7-bdshot * * * * * 8 *
MatekF405 * * * * * 0 *
Pixhawk1-1M-bdshot * * * * 0 *
f103-QiotekPeriph *
f303-Universal *
iomcu *
revo-mini * * * * * 0 *
skyviper-v2450 *
Tested in SITL with these commands:
# this one should move the vehicle:
# message set_position_target_local_ned 0 1 1 1 0b1111111111111000 10 10 0 0 0 0 0 0 0 0 0
# this one should be ignored as acceleration is supplied along with position:
# message set_position_target_local_ned 0 1 1 1 0b1111111000111000 10 10 0 0 0 0 0 0 0 0 0
# should work:
# message set_position_target_global_int 0 1 1 0 0b1111111111111000 -353630399 1491652946 0 0 0 0 0 0 0 0 0
# acceleration not ignored:
# message set_position_target_global_int 0 1 1 0 0b1111111000111000 -353630399 1491652946 0 0 0 0 0 0 0 0 0
(and gdb and breakpoints)
Relates to #23430 which has the same inability to share errors back to users for silently dropping invalid commands
As requested:
GUIDED> message set_position_target_global_int 0 1 1 0 0b1111111000111000 -353630399 1491652946 0 0 0 0 0 0 0 0 0
GUIDED> AP: Ignoring SET_POSITION_TARGET_GLOBAL_INT; set ACC_IGNORE in mask