Browse Source

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

sbg
Lorenz Meier 12 years ago
parent
commit
4b2e8556b8
  1. 9
      apps/drivers/ms5611/ms5611.cpp
  2. 9
      apps/drivers/px4io/px4io.cpp

9
apps/drivers/ms5611/ms5611.cpp

@ -331,8 +331,9 @@ MS5611::probe() @@ -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() @@ -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)

9
apps/drivers/px4io/px4io.cpp

@ -541,9 +541,9 @@ PX4IO::io_set_arming_state() @@ -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) @@ -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[]) @@ -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'");
}

Loading…
Cancel
Save