mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
output of the period of each message (PERIOD_<message_name>_<telemetry_mode index>
This commit is contained in:
@@ -126,9 +126,17 @@ let _ =
|
|||||||
let modes = Xml.children process in
|
let modes = Xml.children process in
|
||||||
|
|
||||||
let i = ref 0 in
|
let i = ref 0 in
|
||||||
|
(** For each mode of this process *)
|
||||||
List.iter (fun mode ->
|
List.iter (fun mode ->
|
||||||
let name = ExtXml.attrib mode "name" in
|
let name = ExtXml.attrib mode "name" in
|
||||||
Xml2h.define (sprintf "TELEMETRY_MODE_%s_%s" process_name name) (string_of_int !i);
|
Xml2h.define (sprintf "TELEMETRY_MODE_%s_%s" process_name name) (string_of_int !i);
|
||||||
|
(* Output the periods of the messages *)
|
||||||
|
List.iter
|
||||||
|
(fun x ->
|
||||||
|
let p = ExtXml.attrib x "period"
|
||||||
|
and n = ExtXml.attrib x "name" in
|
||||||
|
Xml2h.define (sprintf "PERIOD_%s_%d" n !i) (sprintf "(%s)" p))
|
||||||
|
(Xml.children mode);
|
||||||
incr i)
|
incr i)
|
||||||
modes;
|
modes;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user