Skip to content

Commit 7a883b7

Browse files
mortenfyhnvooon
authored andcommitted
mavros_extras: Fix member initialization order
1 parent 860dc98 commit 7a883b7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

mavros_extras/src/plugins/esc_status.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ class ESCStatusPlugin : public plugin::PluginBase
2929
{
3030
public:
3131
ESCStatusPlugin() : PluginBase(),
32+
nh("~"),
3233
_max_esc_count(0),
3334
_max_esc_info_index(0),
34-
_max_esc_status_index(0),
35-
nh("~")
35+
_max_esc_status_index(0)
3636
{}
3737

3838
void initialize(UAS &uas_) override
@@ -151,4 +151,4 @@ class ESCStatusPlugin : public plugin::PluginBase
151151
} // namespace mavros
152152

153153
#include <pluginlib/class_list_macros.h>
154-
PLUGINLIB_EXPORT_CLASS(mavros::extra_plugins::ESCStatusPlugin, mavros::plugin::PluginBase)
154+
PLUGINLIB_EXPORT_CLASS(mavros::extra_plugins::ESCStatusPlugin, mavros::plugin::PluginBase)

mavros_extras/src/plugins/fake_gps.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,24 @@ class FakeGPSPlugin : public plugin::PluginBase,
5555
FakeGPSPlugin() : PluginBase(),
5656
fp_nh("~fake_gps"),
5757
gps_rate(5.0),
58+
// WGS-84 ellipsoid (a - equatorial radius, f - flattening of ellipsoid)
59+
earth(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f()),
5860
use_mocap(true),
59-
map_origin(0.0, 0.0, 0.0),
60-
mocap_transform(true),
61-
mocap_withcovariance(false),
6261
use_vision(false),
6362
use_hil_gps(true),
64-
gps_id(0),
63+
mocap_transform(true),
64+
mocap_withcovariance(false),
6565
tf_listen(false),
66-
tf_rate(10.0),
6766
eph(2.0),
6867
epv(2.0),
6968
horiz_accuracy(0.0f),
7069
vert_accuracy(0.0f),
7170
speed_accuracy(0.0f),
71+
gps_id(0),
7272
satellites_visible(5),
7373
fix_type(GPS_FIX_TYPE::NO_GPS),
74-
// WGS-84 ellipsoid (a - equatorial radius, f - flattening of ellipsoid)
75-
earth(GeographicLib::Constants::WGS84_a(), GeographicLib::Constants::WGS84_f())
74+
tf_rate(10.0),
75+
map_origin(0.0, 0.0, 0.0)
7676
{ }
7777

7878
void initialize(UAS &uas_) override

0 commit comments

Comments
 (0)