MCPcopy Create free account
hub / github.com/CopterExpress/clover / notify

Function notify

clover/src/led.cpp:234–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234void notify(const std::string& event)
235{
236 if (ros::param::has("~notify/" + event + "/effect") ||
237 ros::param::has("~notify/" + event + "/r") ||
238 ros::param::has("~notify/" + event + "/g") ||
239 ros::param::has("~notify/" + event + "/b")) {
240 ROS_INFO_THROTTLE(5, "led: notify %s", event.c_str());
241 clover::SetLEDEffect effect;
242 effect.request.effect = ros::param::param("~notify/" + event + "/effect", std::string(""));
243 effect.request.r = ros::param::param("~notify/" + event + "/r", 0);
244 effect.request.g = ros::param::param("~notify/" + event + "/g", 0);
245 effect.request.b = ros::param::param("~notify/" + event + "/b", 0);
246 setEffect(effect.request, effect.response);
247 }
248}
249
250void handleMavrosState(const mavros_msgs::State& msg)
251{

Callers 4

handleMavrosStateFunction · 0.70
handleLogFunction · 0.70
handleBatteryFunction · 0.70
mainFunction · 0.70

Calls 2

paramFunction · 0.85
setEffectFunction · 0.85

Tested by

no test coverage detected