aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/commander.c
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-06-24 09:50:55 +0200
committerJulian Oes <julian@oes.ch>2013-06-24 09:50:55 +0200
commit60e9ea977d90a05826c86eea14f4a2807851d49c (patch)
treea4cb661b0f7b3fb3f12c858feab2bfa37db3aa67 /src/modules/commander/commander.c
parent53dec130c49f69f10527ab55d69de46ee26c58f6 (diff)
downloadpx4-firmware-60e9ea977d90a05826c86eea14f4a2807851d49c.tar.gz
px4-firmware-60e9ea977d90a05826c86eea14f4a2807851d49c.tar.bz2
px4-firmware-60e9ea977d90a05826c86eea14f4a2807851d49c.zip
Conditions where set wrongly in the first 2s after boot
Diffstat (limited to 'src/modules/commander/commander.c')
-rw-r--r--src/modules/commander/commander.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/commander/commander.c b/src/modules/commander/commander.c
index edcdf7e54..9d3adaa1d 100644
--- a/src/modules/commander/commander.c
+++ b/src/modules/commander/commander.c
@@ -1658,7 +1658,7 @@ int commander_thread_main(int argc, char *argv[])
/* check for global or local position updates, set a timeout of 2s */
- if (hrt_absolute_time() - last_global_position_time < 2000000) {
+ if (hrt_absolute_time() - last_global_position_time < 2000000 && hrt_absolute_time() > 2000000) {
current_status.condition_global_position_valid = true;
// XXX check for controller status and home position as well
@@ -1666,7 +1666,7 @@ int commander_thread_main(int argc, char *argv[])
current_status.condition_global_position_valid = false;
}
- if (hrt_absolute_time() - last_local_position_time < 2000000) {
+ if (hrt_absolute_time() - last_local_position_time < 2000000 && hrt_absolute_time() > 2000000) {
current_status.condition_local_position_valid = true;
// XXX check for controller status and home position as well
@@ -1675,7 +1675,7 @@ int commander_thread_main(int argc, char *argv[])
}
/* Check for valid airspeed/differential pressure measurements */
- if (hrt_absolute_time() - last_diff_pres_time < 2000000) {
+ if (hrt_absolute_time() - last_diff_pres_time < 2000000 && hrt_absolute_time() > 2000000) {
current_status.condition_airspeed_valid = true;
} else {