(a bug?) relay (AUX) is not getting high when motor type is set to BrushedWithRelay

Hi,

Faced very wierd issue, probably a bug. Here’s the setup:
A rover with Pixhack 2.8.4 with ArduPilot 4.2.0-rc1, scripting enabled, motors are controlled by L298N.
AUX3-6 are set for relays:

...
RELAY_PIN,52
RELAY_PIN2,53
RELAY_PIN3,54
RELAY_PIN4,55
...
SERVO11_FUNCTION,-1
SERVO12_FUNCTION,-1
SERVO13_FUNCTION,-1
SERVO14_FUNCTION,-1
...

A simple LUA script controls the relays depending on the stick position, but I can easily reproduce the issue with Mission Planner’s relay controls.

Motor type is set to BrushedWithRelay.

Now here is the issue: when I set RELAY0 (AUX3) to a high level and RELAY1 (AUX4) to a low level, the voltage between them is starting to raise, but then quickly goes back to 0 again. If I toggle the relays (RELAY0 goes low and RELAY1 goes high), the voltage is set up correctly (around -3.3V). RELAY3 and RELAY4 work as expected.

Now the interesting part: if I change to motor type to Normal, RELAY0 starts to work as expected!

Changing AUX3 to AUX1 or AUX2 does not change the picture.

Any ideas what’s going on and how to get that fixed?

Addon: this issue happens after arming only

A bug has been submitted can't switch on RELAY0 after arming when motor type is set to BrushedWithRelay · Issue #20637 · ArduPilot/ardupilot · GitHub