[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5736] make -DGPS flag useful: if it exists it shoul
From: |
Christophe De Wagter |
Subject: |
[paparazzi-commits] [5736] make -DGPS flag useful: if it exists it should work |
Date: |
Fri, 27 Aug 2010 19:55:08 +0000 |
Revision: 5736
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5736
Author: dewagter
Date: 2010-08-27 19:55:08 +0000 (Fri, 27 Aug 2010)
Log Message:
-----------
make -DGPS flag useful: if it exists it should work
Modified Paths:
--------------
paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml
paparazzi3/trunk/sw/airborne/gps.h
paparazzi3/trunk/sw/airborne/main_ap.c
Modified: paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml
2010-08-27 19:39:44 UTC (rev 5735)
+++ paparazzi3/trunk/conf/airframes/AirborneCodeReorg/TinyFw.xml
2010-08-27 19:55:08 UTC (rev 5736)
@@ -162,14 +162,12 @@
<firmware name="fixedwing">
<target name="ap" board="tiny_2.11">
- <param name="FLASH_MODE" value="IAP" />
<define name="AGR_CLIMB" />
<define name="ALT_KALMAN" />
- <define name="GENERIC" value="1" />
</target>
<target name="sim" board="pc" />
- <subsystem name="radio_control" type="ppm"/>
+ <subsystem name="radio_control" type="ppm" />
<!-- Communication -->
<subsystem name="telemetry" type="transparent">
Modified: paparazzi3/trunk/sw/airborne/gps.h
===================================================================
--- paparazzi3/trunk/sw/airborne/gps.h 2010-08-27 19:39:44 UTC (rev 5735)
+++ paparazzi3/trunk/sw/airborne/gps.h 2010-08-27 19:55:08 UTC (rev 5736)
@@ -27,7 +27,6 @@
*
*/
-
#ifndef GPS_H
#define GPS_H
@@ -120,6 +119,12 @@
#define GpsToggleLed() {}
#endif
+#ifdef GPS
+#define GpsTimeoutError (cpu_time_sec - last_gps_msg_t >
FAILSAFE_DELAY_WITHOUT_GPS)
+#else
+#define GpsTimeoutError 1
+#endif
+
#define UseGpsPosNoSend(_callback) { \
if (GpsFixValid()) { \
last_gps_msg_t = cpu_time_sec; \
Modified: paparazzi3/trunk/sw/airborne/main_ap.c
===================================================================
--- paparazzi3/trunk/sw/airborne/main_ap.c 2010-08-27 19:39:44 UTC (rev
5735)
+++ paparazzi3/trunk/sw/airborne/main_ap.c 2010-08-27 19:55:08 UTC (rev
5736)
@@ -193,6 +193,7 @@
bool_t gps_lost = FALSE;
+
#define Min(x, y) (x < y ? x : y)
#define Max(x, y) (x > y ? x : y)
@@ -346,7 +347,7 @@
/** If aircraft is launched and is in autonomus mode, go into
PPRZ_MODE_GPS_OUT_OF_ORDER mode (Failsafe) if we lost the GPS */
if (launch) {
- if (cpu_time_sec - last_gps_msg_t > FAILSAFE_DELAY_WITHOUT_GPS) {
+ if (GpsTimeoutError) {
if (pprz_mode == PPRZ_MODE_AUTO2 || pprz_mode == PPRZ_MODE_HOME) {
last_pprz_mode = pprz_mode;
pprz_mode = PPRZ_MODE_GPS_OUT_OF_ORDER;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5736] make -DGPS flag useful: if it exists it should work,
Christophe De Wagter <=