diff options
author | Julian Oes <julian@oes.ch> | 2013-08-22 15:57:17 +0200 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-08-22 15:57:17 +0200 |
commit | 5f1004117f8086c4bba5b4031f3aebd73411682c (patch) | |
tree | db7650538973c72b35835247095743596af5645e /src/modules/commander/rc_calibration.cpp | |
parent | 6c3da5aeddf929f5a4f19f6bd1b75c911c2a414c (diff) | |
download | px4-firmware-5f1004117f8086c4bba5b4031f3aebd73411682c.tar.gz px4-firmware-5f1004117f8086c4bba5b4031f3aebd73411682c.tar.bz2 px4-firmware-5f1004117f8086c4bba5b4031f3aebd73411682c.zip |
Restore proper feedback (mavlink and tone) for calibration commands, etc
Diffstat (limited to 'src/modules/commander/rc_calibration.cpp')
-rw-r--r-- | src/modules/commander/rc_calibration.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/commander/rc_calibration.cpp b/src/modules/commander/rc_calibration.cpp index 0de411713..fe87a3323 100644 --- a/src/modules/commander/rc_calibration.cpp +++ b/src/modules/commander/rc_calibration.cpp @@ -46,8 +46,13 @@ #include <systemlib/param/param.h> #include <systemlib/err.h> +/* oddly, ERROR is not defined for c++ */ +#ifdef ERROR +# undef ERROR +#endif +static const int ERROR = -1; -void do_rc_calibration(int mavlink_fd) +int do_rc_calibration(int mavlink_fd) { mavlink_log_info(mavlink_fd, "trim calibration starting"); @@ -75,9 +80,9 @@ void do_rc_calibration(int mavlink_fd) if (save_ret != 0) { mavlink_log_critical(mavlink_fd, "TRIM CAL: WARN: auto-save of params failed"); + return ERROR; } - tune_positive(); - mavlink_log_info(mavlink_fd, "trim calibration done"); -}
\ No newline at end of file + return OK; +} |