diff options
Diffstat (limited to 'src/systemcmds/preflight_check')
-rw-r--r-- | src/systemcmds/preflight_check/preflight_check.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/systemcmds/preflight_check/preflight_check.c b/src/systemcmds/preflight_check/preflight_check.c index 7b1c9679e..4bcce18fb 100644 --- a/src/systemcmds/preflight_check/preflight_check.c +++ b/src/systemcmds/preflight_check/preflight_check.c @@ -41,6 +41,7 @@ #include <unistd.h> #include <stdlib.h> #include <stdio.h> +#include <string.h> #include <fcntl.h> #include <errno.h> @@ -143,6 +144,7 @@ int preflight_check_main(int argc, char *argv[]) float param_min, param_max, param_trim, param_rev, param_dz; bool rc_ok = true; + char nbuf[20]; for (int i = 0; i < 12; i++) { /* should the channel be enabled? */ @@ -217,7 +219,7 @@ int preflight_check_main(int argc, char *argv[]) /* sanity checks pass, enable channel */ if (count) { - mavlink_log_critical("ERROR: %d config error(s) for RC channel %d.", count, (channel + 1)); + mavlink_log_critical(mavlink_fd, "ERROR: %d config error(s) for RC channel %d.", count, (i + 1)); usleep(100000); rc_ok = false; } |