This makes the onboard check consistent with hmc5883_bus_option
initialization. If the current bus is the onboard bus, return !external.
It fixes the onboard mag (HMC5883) for AeroFC. Its priority is now 100,
previously it was 255, so that if an external mag is attached, it will be
preferred.
This reverts commit 126172d70c.
This commit is going in the wrong direction: it's actually the same as
it was before, but allows changing the autostart configuration to
something other than 4070, which means people could wrongly assume it
would work in other configurations.
- fixed a bug where tilt compensation was done also when the horizontal
velocity was controlled. This is not needed because in this case
the controller outputs a 3D thrust vector.
Signed-off-by: Roman <bapstroman@gmail.com>
(leads to double publishing on the console when a new link is established, but this is the best compromise between fixing and completely restructuring)
This resolves a bug where a takeoff would go sideways instead of
straight up. What happened was that the position setpoint got shifted
around even though there was actually no real setpoint set but only a
setpoint of type IDLE. This then lead to a position setpoint far away
from the takeoff point and therefore scary takeoffs.
This fix prevents the part of the position controller which
moves/integrates the position setpoint from running in the case of an
idle setpoint.
This bug could be reproduced by switching the vehicle to mission mode
without a valid mission, then switch to hold mode, and then send the arm
and takeoff command.
This way user can set aftwards any other AUTOSTART value and it will
not be overwritten.
Also move the block up and set SYS_AUTOCONFIG, this way if air frame
configuration was reset in ground station it will wipe the parameters
before load new ones.
A large buffer on the heap was not deallocated when parameters were saved,
but there were no changes to the parameters. In that case
parameter_flashfs_write() was not called, which was previously responsible
for freeing the buffer.
This patch moves the responsibility of freeing the buffer to the calling
side, which already explicitly allocates the buffer.
The mapping of PX4_SPIDEV_ACCEL_MAG to PX4_SPIDEV_ICM is not
a clean approach and the PX4_SPIDEV_MPU is already used by the
mpu9250 leaving the only (and the correct) option to the use
PX4_SPIDEV_ICM and make it map to the reused ACCEL_MAG_CS PC15
as 206080D_CS