Insure a 0.0 voltage initial condition on VDD_3V3_SENSORS
By starting the GPIO_VDD_3V3_SENSORS_EN, low and deferring
the GPIO init of the slave selects and drdy signals until
board_app_initialize. We get ~ 180 ms of power off time
with 0.00 voltage applied to the sensors.
This ensures that the massive (several hundred params if temperature compensation is enabled) param load is not done in flight. We also lower the priority to ensure that attitude controllers and estimators which might consume sensor data directly execute immediately, which should reduce their latency.
If we have not received an inbound heartbeat we are probably not connected and so user-facing output (which is even buffered) should go only out once we are connected.
This commit fixed a bug were the mag was orphened on a reset.
That resulted in MAG timeouts on reset or test operations and
left the mag in a broken state.
We want to setup the mag interface with retries and report
failurs.
Move retry logic to contol point, instead of hiding re-reading
the ID in ak8963_check_id.
Allow it to fail once to overcome a read of 0 on firt read.
after 2 failure report error to console and reset the
mpu9250's I2C master (SPI to I2C bridge)
The same retry logic is used on the ak8963_read_adjustments
with a reset of the I2C master module after 5 fails. If it
fails fter 10 retires. Disabel the mad and report the failure
on the console, stating it is disabled.
On initialization, if after 3 retries to re-init the mpu9250 from
the checked registers values, it fails. Ensure thath the fact the
driver is exitting is logged to console.
Check that the mpu9250's configured registers match the settings
written to them. Attempt to fix any that do not up to 3 times.
printing erros to the console on mismatches and returning
faliure if after 3 attempts the any of the values are
still wrong.