paparazzi / pprzlink

Message and communication library for the Paparazzi UAV system
Other
24 stars 55 forks source link

IvyMessagesInterface send_request not working as expected #131

Open rafael1193 opened 3 years ago

rafael1193 commented 3 years ago

The function IvyMessagesInterface.send_request is sending the agent name in the place of the message class.

A CONFIG request message is sent as IvyMessagesInterface 63240_1 CONFIG_REQ 200 instead of ground 63240_1 CONFIG_REQ 200

https://github.com/paparazzi/pprzlink/blob/f8e9822347ee2d306e30c4f675ac1897d28f3768/lib/v2.0/python/pprzlink/ivy.py#L295

should be replaced by

class_name, new_id, request_message.name, request_message.payload_to_ivy_string()

gautierhattenberger commented 3 years ago

Actually, this is correct, if you compare to the ocaml lib, it is the sender (agent) name that is sent in first position: https://github.com/paparazzi/pprzlink/blob/master/lib/v2.0/ocaml/pprzLink.ml#L814

The confusion is probably coming from the fact that the agent name of the server is "ground", but does not refer to the class name in fact. https://github.com/paparazzi/paparazzi/blob/master/sw/ground_segment/tmtc/server.ml#L25