How to set up leak sensor on non-pixhawk hardware

Does anyone have any experience setting up the leak sensor on non-pixhawk hardware? I’m using a Matek H743-Wing V2. I have attached the sensor to S10 and manually selected pin 59 in QGC according to the mapping chart below.

So far it doesn’t seem to work. I feel like I’m missing something with the pin resource assignment but I can’t find any further information. The autopilot does not have a BRD_PWM_COUNT parameter but I’m thinking there must be some way to define the pin as GPIO instead of PWM.

Historically BRD_PWM_COUNT has been the way to configure which pins are PWM vs GPIO, across ArduPilot. Seems like last year there were some changes to increase flexibility, so more recent firmwares just require setting the relevant SERVOn_FUNCTION to Disabled (-1), or alternatively using the new SERVO_GPIO_MASK parameter :slight_smile:

This is something we’re yet to document because it doesn’t yet affect the stable firmware, but we’re currently in the process of improving our documentation system to support multiple software/firmware versions, so in future these kinds of changes should be documented pretty much as they occur :slight_smile:

Thank you for your help! I see that the servo channel I’m using is currently disabled but it’s still not working. At least I know I’m on the right track. :slight_smile:

I suspect this is the issue:

apparently we don’t accept numbers above 55. I don’t really know the historical reasoning behind that. Try increasing that number and check if it works on your setup.

1 Like

Thank you! I’ll try it out this weekend.