mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Copter: reject change_command if not in AUTO
This commit is contained in:
parent
0778454434
commit
57b291b1c5
@ -4,6 +4,11 @@
|
||||
//----------------------------------------
|
||||
static void change_command(uint8_t cmd_index)
|
||||
{
|
||||
// check we are in AUTO mode
|
||||
if (control_mode != AUTO) {
|
||||
return;
|
||||
}
|
||||
|
||||
// limit range
|
||||
cmd_index = min(g.command_total - 1, cmd_index);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user