Skip to content

Commit

Permalink
Merge pull request #8406 from iNavFlight/MrD_disable-stick-commands-i…
Browse files Browse the repository at this point in the history
…f-connected-to-configurator

Disable stick commands if in CLI
  • Loading branch information
DzikuVx committed Oct 1, 2022
2 parents 87f4e2b + f1f78b9 commit fe37791
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/fc/rc_controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

#include "drivers/time.h"

#include "fc/cli.h"
#include "fc/config.h"
#include "fc/controlrate_profile.h"
#include "fc/fc_core.h"
Expand Down Expand Up @@ -251,7 +252,12 @@ void processRcStickPositions(throttleStatus_e throttleStatus)
return;
}

// actions during not armed
// Disable stick commands when in CLI mode. Ideally, they should also be disabled when configurator is connected
if (cliMode) {
return;
}

// actions during not armed and not in CLI

// GYRO calibration
if (rcSticks == THR_LO + YAW_LO + PIT_LO + ROL_CE) {
Expand Down
1 change: 1 addition & 0 deletions src/main/io/osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4528,6 +4528,7 @@ textAttributes_t osdGetSystemMessage(char *buff, size_t buff_size, bool isCenter
}

/* Messages that are shown regardless of Arming state */

#ifdef USE_DEV_TOOLS
if (systemConfig()->groundTestMode) {
messages[messageCount++] = OSD_MESSAGE_STR(OSD_MSG_GRD_TEST_MODE);
Expand Down

0 comments on commit fe37791

Please sign in to comment.