diff --git a/conf/airframes/gorazoptere_brushless_ANALOG.xml b/conf/airframes/gorazoptere_brushless_ANALOG.xml
index b8cc4335fd..b877d9f869 100644
--- a/conf/airframes/gorazoptere_brushless_ANALOG.xml
+++ b/conf/airframes/gorazoptere_brushless_ANALOG.xml
@@ -49,6 +49,9 @@
+
@@ -66,8 +69,10 @@
-
-
+
+
+
+
@@ -80,6 +85,7 @@
+
diff --git a/conf/conf.xml b/conf/conf.xml
index 437ce72407..789e811faf 100644
--- a/conf/conf.xml
+++ b/conf/conf.xml
@@ -38,7 +38,7 @@
ac_id="4"
airframe="airframes/plaster1.xml"
radio="radios/mc3030.xml"
- flight_plan="flight_plans/ricou_vz.xml"
+ flight_plan="flight_plans/muret_mini.xml"
/>
diff --git a/conf/control_panel.xml b/conf/control_panel.xml
index f107c5f411..9378af9d8f 100644
--- a/conf/control_panel.xml
+++ b/conf/control_panel.xml
@@ -139,7 +139,7 @@
-
+
@@ -228,6 +228,17 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/conf/flight_plans/mav05.xml b/conf/flight_plans/mav05.xml
index d91d092374..1066423665 100644
--- a/conf/flight_plans/mav05.xml
+++ b/conf/flight_plans/mav05.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/conf/flight_plans/muret_mini.xml b/conf/flight_plans/muret_mini.xml
index 71342ecd01..eb7ec5c05b 100644
--- a/conf/flight_plans/muret_mini.xml
+++ b/conf/flight_plans/muret_mini.xml
@@ -3,40 +3,44 @@
-
-
-
+
+
+
-
+
+
+
-
-
-
+
-
+
-
+
-
+
+
+
+
+
-
+
diff --git a/conf/flight_plans/zigzag.xml b/conf/flight_plans/zigzag.xml
index 80d1da990e..32b08f0eed 100644
--- a/conf/flight_plans/zigzag.xml
+++ b/conf/flight_plans/zigzag.xml
@@ -35,6 +35,7 @@
+
diff --git a/sw/airborne/autopilot/estimator.c b/sw/airborne/autopilot/estimator.c
index e3d3c3c234..4f31be0415 100644
--- a/sw/airborne/autopilot/estimator.c
+++ b/sw/airborne/autopilot/estimator.c
@@ -142,8 +142,6 @@ void estimator_update_state_3DMG( void ) {
#else //NO_IMU
float ir_roll_neutral = RadOfDeg(IR_ROLL_NEUTRAL_DEFAULT);
-/** Initialized to \a IR_PITCH_NEUTRAL_DEFAULT.
- * Changed with @@@@@ EST-CE QUE CA CHANGE @@@@@ */
float ir_pitch_neutral = RadOfDeg(IR_PITCH_NEUTRAL_DEFAULT);
void estimator_update_state_infrared( void ) {
@@ -193,9 +191,7 @@ void estimator_update_state_infrared( void ) {
#endif
- float rad_of_ir_roll = rad_of_ir * ir_roll;
-
- estimator_phi = rad_of_ir * ir_roll -ir_roll_neutral;
+ estimator_phi = rad_of_ir * ir_roll - ir_roll_neutral;
#if defined IR_RELIEF_CORRECTION
diff --git a/sw/airborne/fly_by_wire/servo.c b/sw/airborne/fly_by_wire/servo.c
index fb4991ba02..f93907b772 100644
--- a/sw/airborne/fly_by_wire/servo.c
+++ b/sw/airborne/fly_by_wire/servo.c
@@ -119,6 +119,11 @@ servo_init( void )
* Configure output compare to toggle the output bits.
*/
TCCR1A |= _BV(SERVO_COM0 );
+
+#ifdef SERVOS_FALLING_EDGE
+ /** Starts CLOCK high for the falling edge case */
+ TCCR1A |= _BV(SERVO_FORCE);
+#endif
/* Clear the interrupt flags in case they are set */
TIFR = _BV(SERVO_FLAG);
@@ -143,6 +148,33 @@ SIGNAL( SIG_OUTPUT_COMPARE1A )
static uint8_t servo = 0;
uint16_t width;
+#ifdef SERVOS_FALLING_EDGE
+#define RESET_WIDTH (CLOCK*1000)
+#define FIRST_PULSE_WIDTH (CLOCK*100)
+/** The clock pin has been initialized high and is toggled down by
+the timer.
+ Unfortunately it seems that reset does not work on 4017 in this case if it
+occurs after the first falling edge. We add two more states at the end of
+the sequence:
+ - keeping clock low, reset high during 1ms
+ - clock high (toggled by the timer), reset down, during 100us (looks like
+ the first pulse of a standard RC */
+ if (servo == _4017_NB_CHANNELS) {
+ sbi( _4017_RESET_PORT, _4017_RESET_PIN );
+ /** Start a long 1ms reset, keep clock low */
+ SERVO_OCR += RESET_WIDTH;
+ servo++;
+ return;
+ }
+ if (servo > _4017_NB_CHANNELS) {
+ /** Clear the reset, the clock has been toggled high */
+ cbi( _4017_RESET_PORT, _4017_RESET_PIN );
+ /** Starts a short pulse-like period */
+ SERVO_OCR += FIRST_PULSE_WIDTH;
+ servo=0; /** Starts a new sequence next time */
+ return;
+ }
+#else
if (servo >= _4017_NB_CHANNELS) {
sbi( _4017_RESET_PORT, _4017_RESET_PIN );
servo = 0;
@@ -150,7 +182,7 @@ SIGNAL( SIG_OUTPUT_COMPARE1A )
// asm( "nop; nop; nop; nop;nop; nop; nop; nop;nop; nop; nop; nop;nop; nop; nop; nop;" );
cbi( _4017_RESET_PORT, _4017_RESET_PIN );
}
-
+#endif
width = servo_widths[servo];
SERVO_OCR += width;
@@ -160,6 +192,7 @@ SIGNAL( SIG_OUTPUT_COMPARE1A )
servo++;
}
+
void servo_set_one(uint8_t servo, uint16_t value_us) {
servo_widths[servo] = ChopServo(CLOCK*value_us);
}
diff --git a/sw/ground_segment/tmtc/receive.ml b/sw/ground_segment/tmtc/receive.ml
index 0fb551f03d..e8b3d3661b 100644
--- a/sw/ground_segment/tmtc/receive.ml
+++ b/sw/ground_segment/tmtc/receive.ml
@@ -432,7 +432,7 @@ let send_wind = fun a ->
let vs =
["ac_id", Pprz.String id;
"dir", Pprz.Float wind_cap_deg;
- "speed", Pprz.Float wind_polar;
+ "wspeed", Pprz.Float wind_polar;
"mean_aspeed", Pprz.Float mean;
"stddev", Pprz.Float stddev] in
Ground_Pprz.message_send my_id "WIND" vs
diff --git a/sw/tools/gen_airframe.ml b/sw/tools/gen_airframe.ml
index 1e2d1d7310..7beb81c7b4 100644
--- a/sw/tools/gen_airframe.ml
+++ b/sw/tools/gen_airframe.ml
@@ -116,7 +116,8 @@ let parse_section = fun s ->
and max = get_float "max" in
let servos = Xml.children s in
- define "NB_SERVO" (string_of_int (List.length servos));
+ let nb_servos = List.fold_right (fun s m -> Pervasives.max (int_of_string (ExtXml.attrib s "no")) m) servos min_int in
+ define "LAST_SERVO_CHANNEL" (string_of_int nb_servos);
nl ();
let servos_params = Array.create nb_servo_4017 { min = min; neutral = neutral; max = max } in