Skip to content

Commit 613f38d

Browse files
committed
Remove the limits class and dynamically create multiple ESC instances
1 parent 7c45aef commit 613f38d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mavros_extras/src/plugins/esc_telemetry.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,14 @@ 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;
108+
void run(diagnostic_updater::DiagnosticStatusWrapper &stat) override {};
110109
};
111110

112111
/**
@@ -251,7 +250,7 @@ class ESCTelemetryPlugin : public plugin::PluginBase
251250
}
252251
ROS_INFO("%d ESCs detected", _esc_count);
253252
for (uint i = 0; i < _esc_count; ++i) {
254-
v.emplace_back(utils::format("ESC%u", i), *lim);
253+
v.emplace_back(utils::format("ESC%u", i));
255254
}
256255
}
257256

0 commit comments

Comments
 (0)