AP_PiccoloCAN: Fix logic to improve readability

This commit is contained in:
Oliver Walters 2020-07-14 17:05:16 +10:00 committed by Andrew Tridgell
parent 818e7f2cdf
commit 09d38f8729
1 changed files with 5 additions and 1 deletions

View File

@ -384,7 +384,11 @@ void AP_PiccoloCAN::send_esc_messages(void)
// No ESCs are selected? Don't send anything
if (_esc_bm == 0x00) {
} else if (hal.util->get_soft_armed()) {
return;
}
// System is armed - send out ESC commands
if (hal.util->get_soft_armed()) {
bool send_cmd = false;
int16_t cmd[4] {};