The message handling was not obeying action focused messages and high-rate messages properly before. With this change update rates track the desired rates closely. Critical high-rate messages such as ADS-B are queued additionally to guarantee that all received packets are being correctly forwarded.
- change memory allocation from stack to a malloc'd buffer. This avoids
increasing the stack size. And since FTP is rarely used, the buffers
are only allocated upon use and freed after a time of 2s inactivity.
- adds PX4_ROOTFSDIR as root directory prefix. This does not change
anything on NuttX, but in SITL it will avoid enumerating the whole
disk tree when using QGC (which enumerates all files recursively).
The provided argument payload->offset is in range [0, num_file_entries-1],
but seekdir might use a completely different range. It is not defined
by the API spec. It is only useful in conjunction with telldir().
This can happen for example when a param type is changed from int32 to
float. The type check will then fail if the param is stored and the param
import will be aborted.
Now we just skip the entry and continue loading the rest.
Both PX4Test and Beat noted if only Brick to was connected
battery_status Intance 0 voltage was 0V for Brick2
The priority selection logic is run prior to the subscription
creation and only updated the priority on a change. Before the
subscriotions were created.
_battery_pub_intance0ndx is suposed track the location in
the _battery_pub array that is instance 0. It is then used
to associate (move) instance 0 with (to) the lowest brick
(highest priority in HW) brick that is selected in HW.
The Bug was that before the subscriptions are created,
_battery_pub_intance0ndx set to 1. And then and never updated.
The fix was to only run the priority selection logic once
the subscriptions are created.
This change implements the publishing of batery_status messages
for each brick on the system, using multi-pub.
Backward compatiblity is achived by always publishing the
batery_status of the bick that has been selected by the HW
Power Controller (PC) on instance 0.
The batery_status.system_source will be true in one and
only one batery_status publication when a valid bit is
set in system_power.brick_valid. However, if USB is connected,
and both brikcs are not providing voltages to the PC
that are in the Under/Over Voltage Window (set in HW)
the system_source may be false in all publications.
system_source - This battery status is for the brick that is
supplying VDD_5V_IN
priority - Zero based, This battery status is for the brick
that is connected to the Power controller's
N-1 priority input. V1..VN. 0 would normally be
Brick1, 1 for Brick2 etc
Battery now assigns connected from the api in the
updateBatteryStatus, as well as system_source and priority
Test flights reported the warning `[load_mon] log_writer_file low on stack! (292 bytes left)`
Increase stack size from 1060 to 1072 (=8 + 1060 rounded to next multiple of 8).
This PR is preliminary ground work for FMUv5.
PX4 does not use the NuttX adc driver. But used the same format
for the data returned by the nuttx ADC driver.
There was a fixme:in src/platforms/px4_adc.h "this needs to be
a px4_adc_msg_s type" With this PR the need for
src/platforms/px4_adc.h goes away as the driver drv_adc.h now
describes the px4_adc_msg_t.