Dedicated EFI driver for Fly Henry ECU

Hello everybody, this is my first post, I couldn’t find a section/topic about writing/integrating custom drivers to support new EFI modules, so I am posting here, please redirect me if i did it wrong.

I wrote and now testing a code for parsing Telemetry data coming from FlyHenry’s EFI ECU,
It is not done via LUA scripting, but with a dedicated driver called AP_EFI_Serial_FH.

It is working correctly, parsing the FlyHenry’s serial telemetry data, converts data types, align ranges and injects results into ArduPilot’s stack… I have implemented the FlyHenry’s telemetry protocol on my own and replicated the way how variable forwarding was done for MegaSquirt2 and LUTAN ecu’s.

Now I want to use the reverse data path - TX line of the AP’s telemetry port to control EFI’s Ignition, Starter, ECO/MAXP for fuel mixture profiles and Throttle, as Henry’s telemtry protocol is auto-streaming and doesn’t require polling/requests it is anyway unused.
I want to fit a small MCU controller which will read the serial data coming form ArduPilot and control the EFI ECU - instead of having 4 separate PWM channels dedicated on these functions.

Can someone guide me, how to get those variables from the EFI_Serial driver context, if it is possible without modifying code of AP_ICE module… I need those few flags and one variable to be accessed from AP_EFI_SERIAL_FH::update() so i can send them on a regular time basis or immediately if there is a change. The goal is to fully control the engine only via Serial, leaving more PWM channels free, and to simplify wiring between AP and ICE.

Thank you in advance
Best Regards

Your class has to either be friends with EFI_Serial or preferably.be implemented as a backend for the EFI driver. Former is a very hacky solution and shouldn’t be used. Later may involve restructuring the code if there is no frontend backend split but should produce more maintainable code.