Browse Source

change type mag_scale to type struct mag_calibration_s for compatibility with master (only noted this thanks to travis build test)

sbg
Robert Dickenson 9 years ago committed by Lorenz Meier
parent
commit
91241626a9
  1. 10
      src/drivers/lis3mdl/lis3mdl.cpp

10
src/drivers/lis3mdl/lis3mdl.cpp

@ -147,7 +147,7 @@ private: @@ -147,7 +147,7 @@ private:
unsigned _measure_ticks;
ringbuffer::RingBuffer *_reports;
mag_scale _scale;
struct mag_calibration_s _scale;
float _range_scale;
float _range_ga;
bool _collect_phase;
@ -743,14 +743,14 @@ LIS3MDL::ioctl(struct file *filp, int cmd, unsigned long arg) @@ -743,14 +743,14 @@ LIS3MDL::ioctl(struct file *filp, int cmd, unsigned long arg)
case MAGIOCSSCALE:
/* set new scale factors */
memcpy(&_scale, (mag_scale *)arg, sizeof(_scale));
memcpy(&_scale, (struct mag_calibration_s *)arg, sizeof(_scale));
/* check calibration, but not actually return an error */
(void)check_calibration();
return 0;
case MAGIOCGSCALE:
/* copy out scale factors */
memcpy((mag_scale *)arg, &_scale, sizeof(_scale));
memcpy((struct mag_calibration_s *)arg, &_scale, sizeof(_scale));
return 0;
case MAGIOCCALIBRATE:
@ -1018,7 +1018,7 @@ int LIS3MDL::calibrate(struct file *filp, unsigned enable) @@ -1018,7 +1018,7 @@ int LIS3MDL::calibrate(struct file *filp, unsigned enable)
// XXX do something smarter here
int fd = (int)enable;
struct mag_scale mscale_previous = {
struct mag_calibration_s mscale_previous = {
0.0f,
1.0f,
0.0f,
@ -1027,7 +1027,7 @@ int LIS3MDL::calibrate(struct file *filp, unsigned enable) @@ -1027,7 +1027,7 @@ int LIS3MDL::calibrate(struct file *filp, unsigned enable)
1.0f,
};
struct mag_scale mscale_null = {
struct mag_calibration_s mscale_null = {
0.0f,
1.0f,
0.0f,

Loading…
Cancel
Save