Skip to content

Commit

Permalink
plugins: imu_pub: fix const initializers for gcc 4.6
Browse files Browse the repository at this point in the history
Fix for build failure devel-hydro-mavros #4.
  • Loading branch information
vooon committed Jun 16, 2014
1 parent e1210a4 commit 964a17f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/plugins/imu_pub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ class IMUPubPlugin : public MavRosPlugin {
IMUPubPlugin() :
linear_accel_vec(),
has_hr_imu(false),
has_scaled_imu(false)
has_scaled_imu(false),
gauss_to_tesla(1.0e-4),
millit_to_tesla(1000.0),
millirs_to_radsec(1000.0),
millig_to_ms2(9.80665 / 1000.00),
millibar_to_pascal(1.0e5)
{
};

Expand Down Expand Up @@ -137,11 +142,11 @@ class IMUPubPlugin : public MavRosPlugin {
boost::array<double, 9> angular_velocity_cov;
boost::array<double, 9> orientation_cov;

const double gauss_to_tesla = 1.0e-4;
const double millit_to_tesla = 1000.0;
const double millirs_to_radsec = 1000.0;
const double millig_to_ms2 = 9.80665 / 1000.0;
const double millibar_to_pascal = 1.0e5;
const double gauss_to_tesla; // = 1.0e-4;
const double millit_to_tesla; // = 1000.0;
const double millirs_to_radsec; // = 1000.0;
const double millig_to_ms2; // = 9.80665 / 1000.0;
const double millibar_to_pascal; // = 1.0e5;


void handle_attitude(const mavlink_message_t *msg) {
Expand Down

0 comments on commit 964a17f

Please sign in to comment.