*** empty log message ***

This commit is contained in:
Pascal Brisset
2005-08-27 21:57:07 +00:00
parent ec01199121
commit 91898c4abd
7 changed files with 34 additions and 15 deletions
+2 -2
View File
@@ -367,9 +367,9 @@
<message name="INFRARED" id="18">
<field name="ac_id" type="string"/>
<field name="gps_hybrid_mode" type="uint8" values="OFF|ON"/>
<field name="gps_hybrid_mode" type="string" values="OFF|ON"/>
<field name="gps_hybrid_factor" type="float"/>
<field name="contrast_status" type="string" values="DEFAULT|WAITING|SET"/>
<field name="contrast_status" type="string" values="DEFAULT|WAITING|SET|SKIPPED"/>
<field name="contrast_value" type="int16"/>
</message>
+7 -4
View File
@@ -475,10 +475,13 @@ inline void periodic_task( void ) {
DOWNLINK_SEND_CIRCLE(&circle_x, &circle_y, &circle_radius); }
if (in_segment) {
DOWNLINK_SEND_SEGMENT(&segment_x_1, &segment_y_1, &segment_x_2, &segment_y_2); }
if (calib_status == WAITING_CALIB_CONTRAST) {
DOWNLINK_SEND_CALIB_START(); }
if (calib_status == CALIB_DONE && !estimator_flight_time) {
DOWNLINK_SEND_CALIB_CONTRAST(&ir_contrast); }
if (!estimator_flight_time) {
if (calib_status == WAITING_CALIB_CONTRAST) {
DOWNLINK_SEND_CALIB_START();
} else if (calib_status == CALIB_DONE) {
DOWNLINK_SEND_CALIB_CONTRAST(&ir_contrast);
}
}
}
switch(_4Hz) {
case 0:
+7 -3
View File
@@ -54,6 +54,7 @@ let ap_modes = [|"MANUAL";"AUTO1";"AUTO2";"HOME"|]
let gaz_modes = [|"MANUAL";"GAZ";"CLIMB";"ALT"|]
let lat_modes = [|"MANUAL";"ROLL_RATE";"ROLL";"COURSE"|]
let gps_modes = [|"NOFIX";"DRO";"2D";"3D";"GPSDRO"|]
let gps_hybrid_modes = [|"OFF";"ON"|]
let if_modes = [|"OFF";"DOWN";"UP"|]
let horiz_modes = [|"WAYPOINT";"ROUTE";"CIRCLE"|]
@@ -263,7 +264,9 @@ let log_and_parse = fun log ac_name a msg values ->
a.rpm <- a.throttle *. 100.;
a.bat <- fvalue "voltage" /. 10.;
a.stage_time <- ivalue "stage_time";
a.block_time <- ivalue "block_time"
a.block_time <- ivalue "block_time";
if a.flight_time > 0 && a.infrared.contrast_status = "WAITING" then
a.infrared.contrast_status <- "SKIPPED"
| "PPRZ_MODE" ->
a.ap_mode <- check_index (ivalue "ap_mode") ap_modes "AP_MODE";
a.gaz_mode <- check_index (ivalue "ap_gaz") gaz_modes "AP_GAZ";
@@ -284,7 +287,7 @@ let log_and_parse = fun log ac_name a msg values ->
else if mcu1_status land 0b100 > 0
then "AUTO"
else "MANUAL";
a.infrared.gps_hybrid_mode <- ivalue "lls_calib"
a.infrared.gps_hybrid_mode <- check_index (ivalue "lls_calib") gps_hybrid_modes "HYBRID MODE"
| "CAM" ->
a.cam.phi <- (Deg>>Rad) (fvalue "phi");
a.cam.theta <- (Deg>>Rad) (fvalue "theta");
@@ -356,8 +359,9 @@ let send_fbw = fun a ->
Ground_Pprz.message_send my_id "FLY_BY_WIRE" values
let send_infrared = fun a ->
let gps_hybrid_mode = get_indexed_value gps_hybrid_modes a.infrared.gps_hybrid_mode in
let values = [ "ac_id", Pprz.String a.id;
"gps_hybrid_mode", Pprz.Int a.infrared.gps_hybrid_mode;
"gps_hybrid_mode", Pprz.String gps_hybrid_mode;
"gps_hybrid_factor", Pprz.Float a.infrared.gps_hybrid_factor;
"contrast_status", Pprz.String a.infrared.contrast_status;
"contrast_value", Pprz.Int a.infrared.contrast_value
+10 -3
View File
@@ -120,17 +120,24 @@ let field_of_xml = fun xml ->
let f = try Xml.attrib xml "format" with _ -> default_format t in
(ExtXml.attrib xml "name", { _type = t; fformat = f })
let string_of_values = fun vs ->
String.concat " " (List.map (fun (a,v) -> sprintf "%s=%s" a (string_of_value v)) vs)
let assoc = fun a vs ->
try List.assoc a vs with Not_found ->
failwith (sprintf "Attribute '%s' not found in '%s'" a (string_of_values vs))
let float_assoc = fun (a:string) vs ->
match List.assoc a vs with
match assoc a vs with
Float x -> x
| _ -> invalid_arg "Pprz.float_assoc"
let int_assoc = fun (a:string) vs ->
match List.assoc a vs with
match assoc a vs with
Int x -> x
| _ -> invalid_arg "Pprz.int_assoc"
let string_assoc = fun (a:string) (vs:values) -> string_of_value (List.assoc a vs)
let string_assoc = fun (a:string) (vs:values) -> string_of_value (assoc a vs)
+1 -1
View File
@@ -123,7 +123,7 @@ module Make(AircraftItl : AIRCRAFT_ITL) = struct
gps_availability := Pprz.int_assoc "gps_availability" vs;
wind_x := Pprz.float_assoc "wind_east" vs;
wind_y := Pprz.float_assoc "wind_north" vs;
infrared_contrast := Pprz.float_assoc "ir_contrast" vs; (** FIXME *)
infrared_contrast := Pprz.float_assoc "ir_contrast" vs;
time_scale#set_value (Pprz.float_assoc "time_scale" vs)
in
+1 -1
View File
@@ -1,5 +1,5 @@
/* Definitions and declarations required to compile autopilot code on a
i386 architecture. Binding for OCaml. */
i386 architecture. Bindings for OCaml. */
#include <stdio.h>
#include <sys/time.h>
+6 -1
View File
@@ -1,4 +1,9 @@
/* Infrared soft simulation. OCaml binding. */
/** \file sim_ir.c
* \brief Regroup functions to simulate autopilot/infrared.c
*
* Infrared soft simulation. OCaml binding.
*/
#include <inttypes.h>
#include "airframe.h"