diff --git a/conf/airframes/twinstar5.xml b/conf/airframes/twinstar5.xml
index 0a348e9202..e202aa84a9 100644
--- a/conf/airframes/twinstar5.xml
+++ b/conf/airframes/twinstar5.xml
@@ -159,8 +159,8 @@ fbw.srcs += inter_mcu.c $(SRC_ARCH)/adc_hw.c
ap.CFLAGS += -DDOWNLINK -DUSE_UART0
ap.srcs += downlink.c $(SRC_ARCH)/uart_hw.c
-ap.CFLAGS += -DGPS -DUBX -DUSE_UART1
-ap.srcs += gps_ubx.c gps.c
+#ap.CFLAGS += -DGPS -DUBX -DUSE_UART1
+#ap.srcs += gps_ubx.c gps.c
#ap.CFLAGS += -DMODEM -DDOWNLINK
#ap.srcs += $(SRC_ARCH)/modem_hw.c
diff --git a/conf/messages.xml b/conf/messages.xml
index eaa0ff026e..23bf14ae02 100644
--- a/conf/messages.xml
+++ b/conf/messages.xml
@@ -229,7 +229,7 @@
-
-
+
diff --git a/sw/airborne/arm7/adc_hw.c b/sw/airborne/arm7/adc_hw.c
index 71ff09fc43..862426933b 100644
--- a/sw/airborne/arm7/adc_hw.c
+++ b/sw/airborne/arm7/adc_hw.c
@@ -17,7 +17,7 @@ void adc_buf_channel(uint8_t adc_channel, struct adc_buf* s, uint8_t av_nb_sampl
}
void adc_init( void ) {
- return;
+ // return;
/* AD0.6 as ADC */
PINSEL1 |= 3 << 8;
diff --git a/sw/airborne/inter_mcu.h b/sw/airborne/inter_mcu.h
index 8a3cd4e20c..db9b2f4b64 100644
--- a/sw/airborne/inter_mcu.h
+++ b/sw/airborne/inter_mcu.h
@@ -21,12 +21,12 @@
*
*/
-/** \brief Communication between fbw and ap
+/** \brief Communication between fbw and ap processes
* This unit contains the data structure used to communicate between the
- * "fly by wire" and the "autopilot" parts. It must be linked once in a
+ * "fly by wire" process and the "autopilot" process. It must be linked once in a
* monoprocessor architecture, twice in a twin-processors (the historical
* Atmel AVRs mega8-mega128 one) architecture. In the latter case, the
- * communication process (e.g. SPI) must fill and read these data structures.
+ * inter-mcu communication process (e.g. SPI) must fill and read these data structures.
*/
#ifndef INTER_MCU_H
diff --git a/sw/airborne/main_ap_2.c b/sw/airborne/main_ap_2.c
index ce27867363..66f5d98067 100644
--- a/sw/airborne/main_ap_2.c
+++ b/sw/airborne/main_ap_2.c
@@ -54,9 +54,10 @@ bool_t in_circle;
int16_t circle_x;
int16_t circle_y;
int16_t circle_radius;
+uint8_t modem_nb_ovrn;
#include "ap_downlink.h"
-
+#define PeriodicSendDlValue() {}
void init_ap( void ) {
/* if AP is running in a separate MCU */
@@ -93,12 +94,12 @@ void init_ap( void ) {
void periodic_task_ap( void ) {
// LED_TOGGLE(1);
// LED_TOGGLE(2);
+#ifdef DOWNLINK
+ PeriodicSendAp();
+#endif
}
void event_task_ap( void ) {
-#ifdef DOWNLINK
- ap_downlink_periodic_task();
-#endif
#ifdef GPS
if (GpsBuffer()) {
ReadGpsBuffer();
diff --git a/sw/lib/ocaml/pprz.ml b/sw/lib/ocaml/pprz.ml
index 6a43162494..a2a81d676a 100644
--- a/sw/lib/ocaml/pprz.ml
+++ b/sw/lib/ocaml/pprz.ml
@@ -105,14 +105,14 @@ let formatted_string_of_value = fun format v ->
| v -> string_of_value v
let size_of_field = fun f -> (List.assoc f._type types).size
-let default_format = fun x -> try (List.assoc x types).format with Not_found -> failwith (sprintf "Unknwon format '%s'" x)
+let default_format = fun x -> try (List.assoc x types).format with Not_found -> failwith (sprintf "Unknown format '%s'" x)
let default_value = fun x -> (List.assoc x types).value
let payload_size_of_message = fun message ->
List.fold_right
(fun (_, f) s -> size_of_field f + s)
message.fields
- 2 (** message id + aircraft id *)
+ 3 (** message_len + message id + aircraft id *)
let size_of_message = fun m ->
payload_size_of_message m + 3 (* STX, CK_A, CK_B *)
@@ -273,6 +273,7 @@ module Protocol(Class:CLASS) = struct
let values_of_bin = fun buffer ->
values_of_payload (String.sub buffer 1 (String.length buffer - 1))
+
(** FIXME - this one is wrong since the message lenght introduction **)
let payload_of_values = fun id ac_id values ->
let message = message_of_id id in