forked from Archive/PX4-Autopilot
Make the protocol version more descriptive - helps to understand when / how px4io detect fails.
This commit is contained in:
parent
4f78c3e605
commit
2f968357a3
|
@ -580,6 +580,12 @@ PX4IO::init()
|
||||||
/* get some parameters */
|
/* get some parameters */
|
||||||
unsigned protocol = io_reg_get(PX4IO_PAGE_CONFIG, PX4IO_P_CONFIG_PROTOCOL_VERSION);
|
unsigned protocol = io_reg_get(PX4IO_PAGE_CONFIG, PX4IO_P_CONFIG_PROTOCOL_VERSION);
|
||||||
|
|
||||||
|
if (protocol == _io_reg_get_error) {
|
||||||
|
log("failed to communicate with IO");
|
||||||
|
mavlink_log_emergency(_mavlink_fd, "[IO] failed to communicate with IO, abort.");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
if (protocol != PX4IO_PROTOCOL_VERSION) {
|
if (protocol != PX4IO_PROTOCOL_VERSION) {
|
||||||
log("protocol/firmware mismatch");
|
log("protocol/firmware mismatch");
|
||||||
mavlink_log_emergency(_mavlink_fd, "[IO] protocol/firmware mismatch, abort.");
|
mavlink_log_emergency(_mavlink_fd, "[IO] protocol/firmware mismatch, abort.");
|
||||||
|
|
Loading…
Reference in New Issue