Implement RC fail-safe

This commit is contained in:
Oleg Kalachev
2024-11-04 11:51:17 +03:00
parent 2fdad7bdb6
commit ec832d4e37
7 changed files with 30 additions and 0 deletions

View File

@@ -93,6 +93,7 @@ void handleMavlink(const void *_msg) {
controls[RC_CHANNEL_YAW] = manualControl.r / 1000.0f * MAVLINK_CONTROL_SCALE;
controls[RC_CHANNEL_MODE] = 1; // STAB mode
controls[RC_CHANNEL_ARMED] = 1; // armed
controlsTime = t;
if (abs(controls[RC_CHANNEL_YAW]) < MAVLINK_CONTROL_YAW_DEAD_ZONE) controls[RC_CHANNEL_YAW] = 0;
}