The IO firmware (src/modules/px4iofirmware/registers.c:541) hardcodes the servo rail voltage conversion assuming a 3:1 divider:
unsigned mV = counts * 9900 / 4096;
A PX4IO_P_SETUP_VSERVO_SCALE register already exists in the protocol (protocol.h:171) and is initialized to 10000 (registers.c:140), but it's never actually used in the computation. It's dead code.
This matters because boards derived from the v6X reference design are shipping with different ADC divider ratios. For example, NewBeeDrone's PixNova uses an 11:1 divider (100K/10K) for 0-36V servo rail detection. With the current firmware, their voltage telemetry caps at ~9.9V regardless of actual input. PWM output is unaffected since it's completely decoupled from voltage sensing, so this is a telemetry-only issue, not safety-critical.
The fix should:
- Apply
r_setup_page[PX4IO_P_SETUP_VSERVO_SCALE] in the voltage computation in registers.c
- Make the register writable from the FMU side so boards can set their own scale factor
- Keep the default at 10000 (equivalent to the current 3:1 / 9900mV behavior) for backwards compatibility
Also worth noting: VDD_SERVO_FAULT is defined in px4io.h:128 but never checked anywhere in the IO firmware.
Related: #26966 (NewBeeDrone PixNova board support)
The IO firmware (
src/modules/px4iofirmware/registers.c:541) hardcodes the servo rail voltage conversion assuming a 3:1 divider:A
PX4IO_P_SETUP_VSERVO_SCALEregister already exists in the protocol (protocol.h:171) and is initialized to 10000 (registers.c:140), but it's never actually used in the computation. It's dead code.This matters because boards derived from the v6X reference design are shipping with different ADC divider ratios. For example, NewBeeDrone's PixNova uses an 11:1 divider (100K/10K) for 0-36V servo rail detection. With the current firmware, their voltage telemetry caps at ~9.9V regardless of actual input. PWM output is unaffected since it's completely decoupled from voltage sensing, so this is a telemetry-only issue, not safety-critical.
The fix should:
r_setup_page[PX4IO_P_SETUP_VSERVO_SCALE]in the voltage computation inregisters.cAlso worth noting:
VDD_SERVO_FAULTis defined inpx4io.h:128but never checked anywhere in the IO firmware.Related: #26966 (NewBeeDrone PixNova board support)