aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/hmc5883/hmc5883.cpp
diff options
context:
space:
mode:
authorDon Gagne <don@thegagnes.com>2014-06-29 17:47:24 -0700
committerDon Gagne <don@thegagnes.com>2014-06-29 17:47:24 -0700
commit92adbe9216c96c53d1baa4eb1e14b4ede272c080 (patch)
treea5167e5c336b4f8fcb1550317c7e26da7bfedbfe /src/drivers/hmc5883/hmc5883.cpp
parent28a31708f98eefa4ceb04617f2da3dd7892c99fa (diff)
downloadpx4-firmware-92adbe9216c96c53d1baa4eb1e14b4ede272c080.tar.gz
px4-firmware-92adbe9216c96c53d1baa4eb1e14b4ede272c080.tar.bz2
px4-firmware-92adbe9216c96c53d1baa4eb1e14b4ede272c080.zip
Fix compiler warnings
Diffstat (limited to 'src/drivers/hmc5883/hmc5883.cpp')
-rw-r--r--src/drivers/hmc5883/hmc5883.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/drivers/hmc5883/hmc5883.cpp b/src/drivers/hmc5883/hmc5883.cpp
index fddba806e..b7b368a5e 100644
--- a/src/drivers/hmc5883/hmc5883.cpp
+++ b/src/drivers/hmc5883/hmc5883.cpp
@@ -326,9 +326,9 @@ HMC5883::HMC5883(int bus) :
_range_scale(0), /* default range scale from counts to gauss */
_range_ga(1.3f),
_collect_phase(false),
+ _class_instance(-1),
_mag_topic(-1),
_subsystem_pub(-1),
- _class_instance(-1),
_sample_perf(perf_alloc(PC_ELAPSED, "hmc5883_read")),
_comms_errors(perf_alloc(PC_COUNT, "hmc5883_comms_errors")),
_buffer_overflows(perf_alloc(PC_COUNT, "hmc5883_buffer_overflows")),
@@ -1228,7 +1228,7 @@ HMC5883::print_info()
printf("offsets (%.2f %.2f %.2f)\n", (double)_scale.x_offset, (double)_scale.y_offset, (double)_scale.z_offset);
printf("scaling (%.2f %.2f %.2f) 1/range_scale %.2f range_ga %.2f\n",
(double)_scale.x_scale, (double)_scale.y_scale, (double)_scale.z_scale,
- (double)1.0/_range_scale, (double)_range_ga);
+ (double)(1.0f/_range_scale), (double)_range_ga);
_reports->print_info("report queue");
}