AP_AHRS: fill in error string when invalid backend specified
This commit is contained in:
parent
34bceb8eec
commit
429dbefade
@ -192,7 +192,12 @@ bool AP_ExternalAHRS::get_speed_down(float &speedD)
|
||||
|
||||
bool AP_ExternalAHRS::pre_arm_check(char *failure_msg, uint8_t failure_msg_len) const
|
||||
{
|
||||
return backend && backend->pre_arm_check(failure_msg, failure_msg_len);
|
||||
if (backend == nullptr) {
|
||||
hal.util->snprintf(failure_msg, failure_msg_len, "ExternalAHRS: Invalid backend");
|
||||
return false;
|
||||
}
|
||||
|
||||
return backend->pre_arm_check(failure_msg, failure_msg_len);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user