Skip to content

Commit 9dd8487

Browse files
committed
Even without the limits class, gcc just refuses to dynamicaly create multiple ESC instances
1 parent 7c45aef commit 9dd8487

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

mavros_extras/src/plugins/esc_telemetry.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,13 @@ struct Limits {
9898
}
9999
};
100100

101-
class ESCDiag //: public diagnostic_updater::DiagnosticTask
101+
class ESCDiag : public diagnostic_updater::DiagnosticTask
102102
{
103103
public:
104-
ESCDiag(const std::string& name, const Limits& lim_):
105-
//diagnostic_updater::DiagnosticTask(name),
106-
lim(lim_)
104+
ESCDiag(const std::string& name):
105+
diagnostic_updater::DiagnosticTask(name)
107106
{}
108107

109-
const Limits& lim;
110108
};
111109

112110
/**
@@ -251,7 +249,7 @@ class ESCTelemetryPlugin : public plugin::PluginBase
251249
}
252250
ROS_INFO("%d ESCs detected", _esc_count);
253251
for (uint i = 0; i < _esc_count; ++i) {
254-
v.emplace_back(utils::format("ESC%u", i), *lim);
252+
v.emplace_back(utils::format("ESC%u", i));
255253
}
256254
}
257255

0 commit comments

Comments
 (0)