Support for External Power Modules seems broken in QGC daily with PX4 > 1.11

My configuration includes a UAVCAN-based Power Module and it seems that a recent change to the UAVCAN driver causes the battery source to be automatically set to External which then seems to break QGC.

What I do is:

  1. Flash PX4 master (ff801fbc08e7b8453dd8c21768beceae591ea217) to a Pixhawk 2 Cube
  2. Open QGC Nightly
  3. Reset all parameters to their defaults
  4. Set Power Source to Disabled or Power Module or External (it doesn’t matter)
  5. Reboot and notice that the Power configuration page is ok (not red)
  6. Reboot again without changing any settings
  7. Encounter a message about missing parameters (BAT_V_CHARGED, BAT_N_CELLS, etc.) and a broken Power configuration page like in the attached screenshot.
  8. Notice that under Parameters the BAT1_SOURCE has been set to ‘External’

Since the power configuration is “broken” QGC will not allow take-off. This is also broken in QGC Stable (4.0.11) but in a slightly different way. And it’s also broken in the PX4 1.11 branch