Skip to content

Commit

Permalink
esc_telemetry.cpp: Remove the limits class and dynamically create mul…
Browse files Browse the repository at this point in the history
…tiple ESC instances
  • Loading branch information
amilcarlucas committed Feb 18, 2022
1 parent 014fca4 commit f56d42c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mavros_extras/src/plugins/esc_telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,14 @@ struct Limits {
}
};

class ESCDiag //: public diagnostic_updater::DiagnosticTask
class ESCDiag : public diagnostic_updater::DiagnosticTask
{
public:
ESCDiag(const std::string& name, const Limits& lim_):
//diagnostic_updater::DiagnosticTask(name),
lim(lim_)
ESCDiag(const std::string& name):
diagnostic_updater::DiagnosticTask(name)
{}

const Limits& lim;
void run(diagnostic_updater::DiagnosticStatusWrapper &stat) override {};
};

/**
Expand Down Expand Up @@ -266,7 +265,7 @@ class ESCTelemetryPlugin : public plugin::PluginBase
}
ROS_INFO("%d ESCs detected", _esc_count);
for (uint i = 0; i < _esc_count; ++i) {
v.emplace_back(utils::format("ESC%u", i), *lim);
v.emplace_back(utils::format("ESC%u", i));
}
}

Expand Down

0 comments on commit f56d42c

Please sign in to comment.