A lot more on calibration and RC checks. Needs more testing, but no known issues

This commit is contained in:
Lorenz Meier
2013-08-25 16:33:14 +02:00
parent 8df6acbfaf
commit e119bbb0f1
10 changed files with 246 additions and 141 deletions

View File

@@ -84,6 +84,7 @@
#include <systemlib/systemlib.h>
#include <systemlib/err.h>
#include <systemlib/cpuload.h>
#include <systemlib/rc_check.h>
#include "px4_custom_mode.h"
#include "commander_helper.h"
@@ -617,6 +618,8 @@ int commander_thread_main(int argc, char *argv[])
bool updated = false;
bool rc_calibration_ok = (OK == rc_calibration_check());
/* Subscribe to safety topic */
int safety_sub = orb_subscribe(ORB_ID(safety));
memset(&safety, 0, sizeof(safety));
@@ -727,6 +730,9 @@ int commander_thread_main(int argc, char *argv[])
param_get(_param_system_id, &(status.system_id));
param_get(_param_component_id, &(status.component_id));
status_changed = true;
/* Re-check RC calibration */
rc_calibration_ok = (OK == rc_calibration_check());
}
}