diff --git a/Makefile b/Makefile
index 6a3e0167ca..295c677a3a 100644
--- a/Makefile
+++ b/Makefile
@@ -156,7 +156,7 @@ ac: hard_ac
#
# call with : make bl PROC=[TINY|FBW|AP|GENERIC]
bl:
- cd $(AIRBORNE)/arm7/test/bootloader; make
+ cd $(AIRBORNE)/arm7/test/bootloader; make clean; make
upload_bl: bl
lpc21isp -control $(AIRBORNE)/arm7/test/bootloader/bl.hex /dev/ttyS0 38400 12000
diff --git a/conf/airframes/microjet5.xml b/conf/airframes/microjet5.xml
index 74b8b7dc88..ecb2148137 100644
--- a/conf/airframes/microjet5.xml
+++ b/conf/airframes/microjet5.xml
@@ -51,18 +51,18 @@
-
-
+
+
-
-
-
+
+
+
-
-
+
+
@@ -89,7 +89,7 @@
-
+
@@ -100,7 +100,7 @@
diff --git a/conf/flight_plans/flight_plan.dtd b/conf/flight_plans/flight_plan.dtd
index 93b65ab42b..b940209a30 100644
--- a/conf/flight_plans/flight_plan.dtd
+++ b/conf/flight_plans/flight_plan.dtd
@@ -121,7 +121,8 @@ pitch CDATA #IMPLIED
alt CDATA #IMPLIED
until CDATA #IMPLIED
approaching_time CDATA #IMPLIED
-gaz CDATA #IMPLIED>
+gaz CDATA #IMPLIED
+climb CDATA #IMPLIED>
+
@@ -16,20 +16,22 @@
+
+
+
-
-
+
+
-
-
-
+
+
+
-
@@ -37,13 +39,6 @@
-
-
-
@@ -57,15 +52,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
diff --git a/sw/airborne/arm7/test/bootloader/Makefile b/sw/airborne/arm7/test/bootloader/Makefile
index 75523fb35d..6ff15d8120 100644
--- a/sw/airborne/arm7/test/bootloader/Makefile
+++ b/sw/airborne/arm7/test/bootloader/Makefile
@@ -1,5 +1,5 @@
#PROC_AP PROC_FBW PROC_TINY
-PROC = AP
+#PROC = AP
ALLFLAGS = -DPROC_$(PROC)
LIBNAME = usbstack
diff --git a/sw/airborne/infrared.c b/sw/airborne/infrared.c
index 6d77b57765..dd03293eeb 100644
--- a/sw/airborne/infrared.c
+++ b/sw/airborne/infrared.c
@@ -205,7 +205,7 @@ void estimator_update_state_infrared( void ) {
z_constrast_mode = 0;
#endif
ir_top = Max(ir_top, 1);
- float c = rad_of_ir*(1-z_constrast_mode)+z_constrast_mode*(IR_RAD_OF_IR_CONTRAST/ir_top);
+ float c = rad_of_ir*(1-z_constrast_mode)+z_constrast_mode*((float)IR_RAD_OF_IR_CONTRAST/ir_top);
estimator_phi = c * ir_roll - ir_roll_neutral;
estimator_theta = c * ir_pitch - ir_pitch_neutral;
}
diff --git a/sw/airborne/nav.c b/sw/airborne/nav.c
index 4da1d9ad5d..5a1dfd1dac 100644
--- a/sw/airborne/nav.c
+++ b/sw/airborne/nav.c
@@ -312,6 +312,13 @@ static unit_ reset_waypoints( void ) __attribute__ ((unused));
extern float nav_altitude;
+#define CLIMB_MODE_GAZ 0
+#define CLIMB_MODE_PITCH 1
+#define CLIMB_MODE_AGRESSIVE 2
+#define CLIMB_MODE_BLENDED 3
+
+uint8_t climb_mode = CLIMB_MODE_GAZ;
+
#include "flight_plan.h"
float ground_alt = GROUND_ALT;
@@ -517,12 +524,6 @@ float desired_course = 0.;
float max_roll = MAX_ROLL;
float altitude_error;
-#define CLIMB_MODE_GAZ 0
-#define CLIMB_MODE_PITCH 1
-#define CLIMB_MODE_AGRESSIVE 2
-#define CLIMB_MODE_BLENDED 3
-
-uint8_t climb_mode = CLIMB_MODE_GAZ;
/** \brief Computes ::nav_desired_roll from course estimation and expected
diff --git a/sw/tools/gen_flight_plan.ml b/sw/tools/gen_flight_plan.ml
index 62e03c7187..8c4771969c 100644
--- a/sw/tools/gen_flight_plan.ml
+++ b/sw/tools/gen_flight_plan.ml
@@ -151,12 +151,18 @@ let output_cam_mode = fun x index_of_waypoints ->
lprintf "cam_ac_target(%s);\n" i
| _ -> failwith (sprintf "Error: unknown '%s' cam mode" m)
+let pprz_gaz = fun s ->
+ let g = float_of_string s in
+ if g < 0. || g > 1. then
+ failwith "gaz must be > 0 and < 1";
+ g*. 9600.
+
let output_vmode x wp last_wp =
let pitch = try Xml.attrib x "pitch" with _ -> "0.0" in
if pitch = "auto"
then begin
lprintf "climb_mode = CLIMB_MODE_PITCH;\n";
- lprintf "nav_desired_gaz = %s;\n" (parsed_attrib x "gaz")
+ lprintf "nav_desired_gaz = %f;\n" (pprz_gaz (parsed_attrib x "gaz"))
end else begin
lprintf "nav_pitch = %s;\n" (parse pitch);
end;
@@ -193,7 +199,7 @@ let output_vmode x wp last_wp =
if (pitch = "auto") then
failwith "auto pich mode not compatible with vmode=gaz";
lprintf "vertical_mode = VERTICAL_MODE_AUTO_GAZ;\n";
- lprintf "nav_desired_gaz = %s;\n" (parsed_attrib x "gaz")
+ lprintf "nav_desired_gaz = %f;\n" (pprz_gaz (parsed_attrib x "gaz"))
| x -> failwith (sprintf "Unknown vmode '%s'" x)
end;
vmode