mirror of https://github.com/ArduPilot/ardupilot
AP_Torqeedo: pre-arm does not provide prefix
This commit is contained in:
parent
b147d59ab7
commit
4c7f23bb67
|
@ -208,6 +208,7 @@ bool AP_Torqeedo::healthy()
|
|||
}
|
||||
|
||||
// run pre-arm check. returns false on failure and fills in failure_msg
|
||||
// any failure_msg returned will not include a prefix
|
||||
bool AP_Torqeedo::pre_arm_checks(char *failure_msg, uint8_t failure_msg_len)
|
||||
{
|
||||
// exit immediately if not enabled
|
||||
|
@ -215,13 +216,12 @@ bool AP_Torqeedo::pre_arm_checks(char *failure_msg, uint8_t failure_msg_len)
|
|||
return true;
|
||||
}
|
||||
|
||||
const char *failure_prefix = "Torqeedo:";
|
||||
if (!_initialised) {
|
||||
hal.util->snprintf(failure_msg, failure_msg_len, "%s not initialised", failure_prefix);
|
||||
strncpy(failure_msg, "not initialised", failure_msg_len);
|
||||
return false;
|
||||
}
|
||||
if (!healthy()) {
|
||||
hal.util->snprintf(failure_msg, failure_msg_len, "%s not healthy", failure_prefix);
|
||||
strncpy(failure_msg, "not healthy", failure_msg_len);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -47,6 +47,7 @@ public:
|
|||
bool healthy();
|
||||
|
||||
// run pre-arm check. returns false on failure and fills in failure_msg
|
||||
// any failure_msg returned will not include a prefix
|
||||
bool pre_arm_checks(char *failure_msg, uint8_t failure_msg_len);
|
||||
|
||||
static const struct AP_Param::GroupInfo var_info[];
|
||||
|
|
Loading…
Reference in New Issue