*** empty log message ***

This commit is contained in:
Antoine Drouin
2005-02-28 18:58:47 +00:00
parent b70035be8b
commit a7fd8b5c94
10 changed files with 68 additions and 60 deletions
+5 -5
View File
@@ -34,15 +34,15 @@
#define MSG_END '\n'
#define UNINIT 0
#define GOT_START 1
#define GOT_CHANNEL 2
#define GOT_LOW 3
#define GOT_HI 4
#define GOT_START 1
#define GOT_CHANNEL 2
#define GOT_LOW 3
#define GOT_HI 4
static uint8_t msg_status;
static uint8_t servo;
static uint16_t value; /* micro-seconds */
static uint16_t value; /* microseconds */
static volatile bool_t msg_valid;
static inline void parse_msg(uint8_t c) {
+1 -1
View File
@@ -22,7 +22,7 @@
include ../../../conf/Makefile.local
all: receive messages
all: receive messages listen.opt
clean:
rm -f receive messages *.bak *~ core *.o .depend *.opt *.out *.cm*
+5 -5
View File
@@ -32,12 +32,12 @@ let _ =
let class_name = ref "telemetry_fbw" in
let serial_dev = ref "/dev/ttyUSB0" in
Arg.parse
[ "-b", Arg.String (fun x -> bus := x), "Bus\tDefault is 127.255.255.25:2010";
"-c", Arg.String (fun x -> class_name := x), "class name";
"-d", Arg.String (fun x -> serial_dev := x), "serial device"]
[ "-b", Arg.String (fun x -> bus := x), "Bus\tDefault is 127.255.255.25:2010";
"-c", Arg.String (fun x -> class_name := x), "Message class name\tDefault is telemetry_fbw";
"-d", Arg.String (fun x -> serial_dev := x), "Serial device\tDefault is /dev/ttyUSB0"]
(fun x -> prerr_endline ("WARNING: don't do anything with "))
"Usage: ";
let module Tele_Class = struct let name = !class_name end in
let module Tele_Pprz = Pprz.Protocol(Tele_Class) in
let module PprzTransport = Serial.Transport(Tele_Pprz) in
@@ -63,7 +63,7 @@ let _ =
let handle_pprz_message = fun (msg_id, values) ->
let msg = Tele_Pprz.message_of_id msg_id in
let s = String.concat " " (List.map snd values) in
Ivy.send (sprintf "%s %s" msg.Pprz.name s) in
Ivy.send (sprintf "1234.567 %s %s" msg.Pprz.name s) in
listen_tty handle_pprz_message !serial_dev;
Ivy.init "Paparazzi listen" "READY" (fun _ _ -> ());
+2 -1
View File
@@ -56,7 +56,8 @@ let format = fun field ->
open GMain
let _ =
let bus = ref "127.255.255.255:2010" in
let classes = ref ["telemetry_ap";"ground"] in
(* let classes = ref ["telemetry_ap";"ground"] in *)
let classes = ref [] in
Arg.parse
[ "-b", Arg.String (fun x -> bus := x), "Bus\tDefault is 127.255.255.25:2010";
"-c", Arg.String (fun x -> classes := x :: !classes), "class name"]
+4 -2
View File
@@ -119,8 +119,10 @@ let magic = fun x -> (Obj.magic x:('a,'b,'c) Pervasives.format)
let format_field = fun buffer index (field:field) ->
let format = field.fformat in
match field._type with
"uint8" | "int8" -> sprintf (magic format) (Char.code buffer.[index])
| "uint16" | "int16" -> sprintf (magic format) (Char.code buffer.[index] lsl 8 + Char.code buffer.[index+1])
"uint8" -> sprintf (magic format) (Char.code buffer.[index])
| "int8" -> sprintf (magic format) (if Char.code buffer.[index] <= 128 then Char.code buffer.[index] else Char.code buffer.[index] - 256)
| "uint16" -> sprintf (magic format) (Char.code buffer.[index] lsl 8 + Char.code buffer.[index+1])
| "int16" -> sprintf (magic format) (if Char.code buffer.[index] lsl 8 + Char.code buffer.[index+1] <= 32768 then Char.code buffer.[index] lsl 8 + Char.code buffer.[index+1] else Char.code buffer.[index] lsl 8 + Char.code buffer.[index+1] - 65536)
| "float" -> sprintf (magic format) (float_of_bytes buffer index)
| "int32" | "uint32" -> sprintf (magic format) (int32_of_bytes buffer index)
| _ -> failwith "format_field"
+1 -1
View File
@@ -7,7 +7,7 @@ BEGIN {
$ENV{PAPARAZZI_SRC}."/sw/lib/perl" : "/usr/lib/paparazzi/";
}
use lib ($paparazzi_lib);
# use lib ($ENV{PAPARAZZI_SRC}."/sw/supervision");
use lib ($ENV{PAPARAZZI_SRC}."/sw/supervision");
use Paparazzi::CpGui;
@ISA = qw(Paparazzi::CpGui);
+2 -1
View File
@@ -80,7 +80,8 @@ let _ =
define "RADIO_NEUTRALS_US" (sprint_float_array (List.map (fun x -> x.neutral) channels_params));
define "RADIO_MAXS_US" (sprint_float_array (List.map (fun x -> x.max) channels_params));
define "RADIO_AVERAGED" (sprint_float_array (List.map (fun x -> x.averaged) channels_params));
define "RADIO_NEUTRALS_PPM" (sprint_float_array (List.map (fun x -> string_of_int ((int_of_string x.neutral)*16)) channels_params));
define "RADIO_TRAVEL_PPM" (sprint_float_array (List.map (fun x -> string_of_float (9600. *. 2. /. (float ((int_of_string x.max) - (int_of_string x.min))) /. 16.)) channels_params));
nl ();
define "AveragedChannel(ch)" "(((int[])RADIO_AVERAGED)[ch])";