Servers by jDrones

How to add custom developed flight mode of arducopter to Dronekit

Hi all,
I have developed a custom flight mode and it runs successfully on the Flight computer. it was given parameter number 27. I want to call it using drone kit/change into custom flight mode using drone kit. I tried to use self.vehicle.mode = “CUSTOM” but drone kit responds saying

raise APIException(“mode (%s, %s) not available on mavlink definition” % (m.custom_mode, m.base_mode))
dronekit.APIException: mode (27, 209) not available on mavlink definition

I understand it is not defined in mavlink definition of drone kit. how can I add/change mavlink definitions that dronekit reads?

Servers by jDrones