opendroneid / opendroneid-core-c

Open Drone ID Core C Library
Apache License 2.0
178 stars 64 forks source link

libmav2odid: Suggest making the `m2o_<msg>` functions available in the interface #61

Closed dcl-beep closed 1 year ago

dcl-beep commented 1 year ago

Firstly, excellent work on this module!

I've been working with this code a bit and found myself wishing the functions below were exposed in the mav2odid.h interface:

static int m2o_basicId(mav2odid_t* m2o, mavlink_open_drone_id_basic_id_t* mavBasicId);
static int m2o_location(mav2odid_t* m2o, mavlink_open_drone_id_location_t* mavLocation);
static int m2o_authentication(mav2odid_t* m2o, mavlink_open_drone_id_authentication_t* mavAuthentication);
static int m2o_selfId(mav2odid_t* m2o, mavlink_open_drone_id_self_id_t* mavSelfId);
static int m2o_system(mav2odid_t* m2o, mavlink_open_drone_id_system_t* mavSystem);
static int m2o_operatorId(mav2odid_t* m2o, mavlink_open_drone_id_operator_id_t* mavOperatorId);

The primary reason for this is that the mavlink_open_drone_id_message_pack_t message requires ODID-encoded messages, and the functions above are extremely convenient for this.

Thanks for reading and for the great work done here.

friissoren commented 1 year ago

I pushed a change to expose those functions in the header file. Enjoy.

dcl-beep commented 1 year ago

Appreciate it @friissoren