Merge branch 'px4io-i2c' of github.com:PX4/Firmware into px4io-i2c

This commit is contained in:
Lorenz Meier
2013-02-07 07:06:42 +01:00
2 changed files with 14 additions and 4 deletions
+7 -2
View File
@@ -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)
+7 -2
View File
@@ -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'");
}