mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 11:43:34 +08:00
Whitespace
This commit is contained in:
@@ -296,6 +296,7 @@ HMC5883::init()
|
|||||||
|
|
||||||
/* do I2C init (and probe) first */
|
/* do I2C init (and probe) first */
|
||||||
ret = I2C::init();
|
ret = I2C::init();
|
||||||
|
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
@@ -617,6 +618,7 @@ HMC5883::measure()
|
|||||||
* Send the command to begin a measurement.
|
* Send the command to begin a measurement.
|
||||||
*/
|
*/
|
||||||
ret = write_reg(ADDR_MODE, MODE_REG_SINGLE_MODE);
|
ret = write_reg(ADDR_MODE, MODE_REG_SINGLE_MODE);
|
||||||
|
|
||||||
if (OK != ret)
|
if (OK != ret)
|
||||||
_measure_errors++;
|
_measure_errors++;
|
||||||
|
|
||||||
@@ -655,6 +657,7 @@ HMC5883::collect()
|
|||||||
/* get measurements from the device */
|
/* get measurements from the device */
|
||||||
cmd = ADDR_DATA_OUT_X_MSB;
|
cmd = ADDR_DATA_OUT_X_MSB;
|
||||||
ret = transfer(&cmd, 1, (uint8_t *)&hmc_report, sizeof(hmc_report));
|
ret = transfer(&cmd, 1, (uint8_t *)&hmc_report, sizeof(hmc_report));
|
||||||
|
|
||||||
if (ret != OK) {
|
if (ret != OK) {
|
||||||
debug("data/status read error");
|
debug("data/status read error");
|
||||||
goto out;
|
goto out;
|
||||||
|
|||||||
Reference in New Issue
Block a user