aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander
diff options
context:
space:
mode:
authorAnton Babushkin <anton.babushkin@me.com>2014-04-04 20:36:11 +0400
committerAnton Babushkin <anton.babushkin@me.com>2014-04-04 20:36:11 +0400
commitf12c76538322b433b9abd02290ca718eff3be8a0 (patch)
tree5ac1f28672fe47ba227c1774470dba91db487543 /src/modules/commander
parent4e6a5ed1e8563a9fc0ac148adee383ea50e7182a (diff)
parent2aa9e3bd780ca0d7c97d72c8f3a6973e32ed2cb3 (diff)
downloadpx4-firmware-f12c76538322b433b9abd02290ca718eff3be8a0.tar.gz
px4-firmware-f12c76538322b433b9abd02290ca718eff3be8a0.tar.bz2
px4-firmware-f12c76538322b433b9abd02290ca718eff3be8a0.zip
Merge branch 'master' into mpc_local_pos
Diffstat (limited to 'src/modules/commander')
-rw-r--r--src/modules/commander/commander.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index 7257cb4b3..47e630d07 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -118,8 +118,7 @@ extern struct system_load_s system_load;
#define STICK_ON_OFF_COUNTER_LIMIT (STICK_ON_OFF_HYSTERESIS_TIME_MS*COMMANDER_MONITORING_LOOPSPERMSEC)
#define POSITION_TIMEOUT 30000 /**< consider the local or global position estimate invalid after 30ms */
-#define RC_TIMEOUT 100000
-#define RC_TIMEOUT_HIL 500000
+#define RC_TIMEOUT 500000
#define DIFFPRESS_TIMEOUT 2000000
#define PRINT_INTERVAL 5000000
@@ -1144,16 +1143,8 @@ int commander_thread_main(int argc, char *argv[])
orb_copy(ORB_ID(vehicle_gps_position), gps_sub, &gps_position);
}
-
- /*
- * XXX workaround:
- * Prevent RC loss in HIL when sensors.cpp is only publishing sp_man at a low rate (e.g. 30Hz)
- * which can trigger RC loss if the computer/simulator lags.
- */
- uint64_t rc_timeout = status.hil_state == HIL_STATE_ON ? RC_TIMEOUT_HIL : RC_TIMEOUT;
-
/* start RC input check */
- if (!status.rc_input_blocked && sp_man.timestamp != 0 && hrt_absolute_time() < sp_man.timestamp + rc_timeout) {
+ if (!status.rc_input_blocked && sp_man.timestamp != 0 && hrt_absolute_time() < sp_man.timestamp + RC_TIMEOUT) {
/* handle the case where RC signal was regained */
if (!status.rc_signal_found_once) {
status.rc_signal_found_once = true;