mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-07 00:53:41 +08:00
changed MOVE_WP message
This commit is contained in:
+11
-2
@@ -273,6 +273,15 @@
|
||||
<field name="w4" type="uint16"/>
|
||||
</message>
|
||||
|
||||
|
||||
<message name="WP_MOVED_LLA" id="35">
|
||||
<field name="wp_id" type="uint8"/>
|
||||
<field name="lat" type="int32" unit="degres"></field>
|
||||
<field name="lon" type="int32" unit="degres"></field>
|
||||
<field name="alt" type="int32" unit="cm"></field>
|
||||
</message>
|
||||
|
||||
|
||||
<message name="PPM" id="100">
|
||||
<field name="ppm_rate" type="uint8"></field>
|
||||
<field name="values" type="uint16[]" unit="ticks"/>
|
||||
@@ -861,8 +870,8 @@
|
||||
<message name="MOVE_WP" id="2" link="forwarded">
|
||||
<field name="wp_id" type="uint8"/>
|
||||
<field name="ac_id" type="uint8"/>
|
||||
<field name="lat" type="float" unit="deg"></field>
|
||||
<field name="lon" type="float" unit="deg"></field>
|
||||
<field name="lat" type="int32" unit="e-7deg"></field>
|
||||
<field name="lon" type="int32" unit="e-7deg"></field>
|
||||
<field name="alt" type="int32" unit="cm"></field>
|
||||
</message>
|
||||
|
||||
|
||||
@@ -841,11 +841,12 @@ let dl_id = "ground_dl" (* Hack, should be [my_id] *)
|
||||
(** Got a ground.MOVE_WAYPOINT and send a datalink.MOVE_WP *)
|
||||
let move_wp = fun logging _sender vs ->
|
||||
let f = fun a -> List.assoc a vs
|
||||
and ac_id = Pprz.string_assoc "ac_id" vs in
|
||||
and ac_id = Pprz.string_assoc "ac_id" vs
|
||||
and deg7 = fun f -> Pprz.Int (truncate (Pprz.float_assoc f vs *. 1e7)) in
|
||||
let vs = [ "ac_id", Pprz.String ac_id;
|
||||
"wp_id", f "wp_id";
|
||||
"lat", f "lat";
|
||||
"lon", f "long";
|
||||
"lat", deg7 "lat";
|
||||
"lon", deg7 "long";
|
||||
"alt", cm_of_m (Pprz.float_assoc "alt" vs) ] in
|
||||
Dl_Pprz.message_send dl_id "MOVE_WP" vs;
|
||||
log logging ac_id "MOVE_WP" vs
|
||||
|
||||
Reference in New Issue
Block a user