3 #include "raspicat/ButtonValues.h" 9 std::ifstream ifs(name);
15 int main(
int argc,
char **argv)
17 init(argc,argv,
"buttons");
23 raspicat::ButtonValues msg;
30 c[0] = msg.front ? 1+c[0] : 0;
31 c[1] = msg.mid ? 1+c[1] : 0;
32 c[2] = msg.rear ? 1+c[2] : 0;
35 msg.front_toggle = not msg.front_toggle;
39 msg.mid_toggle = not msg.mid_toggle;
43 msg.rear_toggle = not msg.rear_toggle;
void publish(const boost::shared_ptr< M > &message) const
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
ROSCPP_DECL void spinOnce()