int main(int argc, char **argv) { ROS_INFO("Try to connect to the R/C Radio "); while(!pctxController.connect()) { sleep(1); ROS_INFO("."); } ros::init(argc, argv, "PCTXController"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("sendPCTXControl", 1000, sendPCTXControl); ros::spin(); return 0; }
void SSR::Network_gui_component::buttonClicked(Button* button) { if (button == connected_button.get()) { Controller* processor = getProcessor(); if (!is_connected) { processor->connect(); } is_connected = processor->is_connected_to_ssr(); connected_button->setToggleState(is_connected, juce::dontSendNotification); } }