Adding new Mavlink message to OSD

Hi everybody,
I’m kind of a beginner to Ardupilot but been able to successfuly managed some projects with it and Mavlink protocols.

Today, I’m trying to modify my current OSD to add an extra information, which is distance sensor/proximity provided by some sensors sending Distance_Sensor messages throught Mavlink to my FC.

I’m working with a miniOSD setup, but I’m unable to make the software on the OSD (Arduino code) understand these messages:

MAVLINK_MSG_ID_DISTANCE_SENSOR:
or
mavlink_msg_distance_sensor_get_id(msg);
or
mavlink_msg_distance_sensor_get_current_distance(msg);

I first thought about libraries but I manually added the “mavlink_msg_distance_sensor.h” file and not better.
Then I tried to make it even easier by switching the heading information (already working) with my sensor distance information.
mavlink_msg_vfr_hud_get_heading(&msg); <==> mavlink_msg_distance_sensor_get_current_distance(msg); But still functions not recognized by the softawre.

Does anyone have a guess about adding new messages ? Maybe I’m not having the good process to find the solution…?

Regards,
Theophile