mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 17:49:49 +08:00
*** empty log message ***
This commit is contained in:
@@ -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
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@
|
||||
<field name="ppm12" type="uint16" unit="us"/>
|
||||
</message>
|
||||
|
||||
<!--
|
||||
<!--
|
||||
<message name="RC" ID="101">
|
||||
<field name="values" type="int16[]" unit="pprz"/>
|
||||
</message>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<message name="PPM" period="5"/>
|
||||
<!-- <message name="RC" period="5"/> -->
|
||||
<message name="SERVOS" period="5"/>
|
||||
<message name="FBW_STATUS" period="1"/>
|
||||
<message name="FBW_STATUS" period="2"/>
|
||||
</mode>
|
||||
<mode name="debug">
|
||||
<message name="PPM" period="0.5"/>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user