mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 15:37:34 +08:00
Merge branch 'px4io-i2c' of github.com:PX4/Firmware into px4io-i2c
This commit is contained in:
@@ -331,8 +331,9 @@ MS5611::probe()
|
||||
|
||||
if ((OK == probe_address(MS5611_ADDRESS_1)) ||
|
||||
(OK == probe_address(MS5611_ADDRESS_2))) {
|
||||
/*
|
||||
* Disable retries; the device gets confused if we retry some of the commands.
|
||||
/*
|
||||
* Disable retries; we may enable them selectively in some cases,
|
||||
* but the device gets confused if we retry some of the commands.
|
||||
*/
|
||||
_retries = 0;
|
||||
return OK;
|
||||
@@ -653,7 +654,11 @@ MS5611::measure()
|
||||
|
||||
/*
|
||||
* Send the command to begin measuring.
|
||||
*
|
||||
* Disable retries on this command; we can't know whether failure
|
||||
* means the device did or did not see the write.
|
||||
*/
|
||||
_retries = 0;
|
||||
ret = transfer(&cmd_data, 1, nullptr, 0);
|
||||
|
||||
if (OK != ret)
|
||||
|
||||
@@ -541,9 +541,9 @@ PX4IO::io_set_arming_state()
|
||||
clear |= PX4IO_P_SETUP_ARMING_VECTOR_FLIGHT_OK;
|
||||
}
|
||||
if (vstatus.flag_external_manual_override_ok) {
|
||||
set |= PX4IO_P_SETUP_ARMING_MANUAL_OVERRIDE;
|
||||
set |= PX4IO_P_FEAT_ARMING_MANUAL_OVERRIDE_OK;
|
||||
} else {
|
||||
clear |= PX4IO_P_SETUP_ARMING_MANUAL_OVERRIDE;
|
||||
clear |= PX4IO_P_FEAT_ARMING_MANUAL_OVERRIDE_OK;
|
||||
}
|
||||
|
||||
return io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, clear, set);
|
||||
@@ -1214,6 +1214,10 @@ monitor(void)
|
||||
int
|
||||
px4io_main(int argc, char *argv[])
|
||||
{
|
||||
/* check for sufficient number of arguments */
|
||||
if (argc < 2)
|
||||
goto out;
|
||||
|
||||
if (!strcmp(argv[1], "start")) {
|
||||
|
||||
if (g_dev != nullptr)
|
||||
@@ -1330,5 +1334,6 @@ px4io_main(int argc, char *argv[])
|
||||
if (!strcmp(argv[1], "monitor"))
|
||||
monitor();
|
||||
|
||||
out:
|
||||
errx(1, "need a command, try 'start', 'stop', 'status', 'test', 'monitor' or 'update'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user