Browse Source

Apply AStyle to fixup formating

sbg
Robert Dickenson 9 years ago committed by Lorenz Meier
parent
commit
cb3c625ea4
  1. 9
      src/drivers/lis3mdl/lis3mdl.cpp
  2. 2
      src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp

9
src/drivers/lis3mdl/lis3mdl.cpp

@ -503,6 +503,7 @@ void LIS3MDL::check_conf(void)
perf_count(_comms_errors); perf_count(_comms_errors);
} }
} }
break; break;
case 50: case 50:
@ -512,6 +513,7 @@ void LIS3MDL::check_conf(void)
perf_count(_comms_errors); perf_count(_comms_errors);
return; return;
} }
if (reg_in != _cntl_reg4) { if (reg_in != _cntl_reg4) {
perf_count(_conf_errors); perf_count(_conf_errors);
ret = write_reg(ADDR_CTRL_REG1, _cntl_reg4); ret = write_reg(ADDR_CTRL_REG1, _cntl_reg4);
@ -520,6 +522,7 @@ void LIS3MDL::check_conf(void)
perf_count(_comms_errors); perf_count(_comms_errors);
} }
} }
break; break;
case 100: case 100:
@ -529,6 +532,7 @@ void LIS3MDL::check_conf(void)
perf_count(_comms_errors); perf_count(_comms_errors);
return; return;
} }
if (reg_in != _cntl_reg5) { if (reg_in != _cntl_reg5) {
perf_count(_conf_errors); perf_count(_conf_errors);
ret = write_reg(ADDR_CTRL_REG5, _cntl_reg5); ret = write_reg(ADDR_CTRL_REG5, _cntl_reg5);
@ -537,6 +541,7 @@ void LIS3MDL::check_conf(void)
perf_count(_comms_errors); perf_count(_comms_errors);
} }
} }
break; break;
case 150: case 150:
@ -555,6 +560,7 @@ void LIS3MDL::check_conf(void)
perf_count(_comms_errors); perf_count(_comms_errors);
} }
} }
break; break;
default: default:
@ -1244,6 +1250,7 @@ int LIS3MDL::set_excitement(unsigned enable)
if (((int)enable) < 0) { if (((int)enable) < 0) {
warnx("WARN: set_excitement negative not supported\n"); warnx("WARN: set_excitement negative not supported\n");
} else if (enable > 0) { } else if (enable > 0) {
_cntl_reg1 |= 0x01; _cntl_reg1 |= 0x01;
} }
@ -1392,12 +1399,14 @@ start_bus(struct lis3mdl_bus_option &bus, enum Rotation rotation)
if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 50)) { if (OK != ioctl(fd, SENSORIOCSPOLLRATE, 50)) {
warn("FAILED: SENSORIOCSPOLLRATE 50Hz"); warn("FAILED: SENSORIOCSPOLLRATE 50Hz");
} }
printf("set poll rate to 50Hz\n"); printf("set poll rate to 50Hz\n");
/* Set to 4 Gauss */ /* Set to 4 Gauss */
if (OK != ioctl(fd, MAGIOCSRANGE, 4)) { if (OK != ioctl(fd, MAGIOCSRANGE, 4)) {
warnx("FAILED: MAGIOCSRANGE 4 Ga"); warnx("FAILED: MAGIOCSRANGE 4 Ga");
} }
printf("set range to 4 Ga\n"); printf("set range to 4 Ga\n");
close(fd); close(fd);

2
src/modules/attitude_estimator_q/attitude_estimator_q_main.cpp

@ -334,7 +334,7 @@ void AttitudeEstimatorQ::task_main()
} else if (ret == 0) { } else if (ret == 0) {
// Poll timeout, do nothing // Poll timeout, do nothing
// RobD debugging - quiet this for now // TODO: RobD debugging - quiet this for now
// PX4_WARN("Q POLL TIMEOUT"); // PX4_WARN("Q POLL TIMEOUT");
continue; continue;
} }

Loading…
Cancel
Save