void SamInit(void) { RecognisePort("TTSIn"); // name the port to be shown in the gui RecognisePort("EmoIn"); // name the port to be shown in the gui RecognisePort("TrackIn"); // name the port to be shown in the gui StartModule("/EMYS"); bTTS.open("/EMYS_TTSIn"); // open the port bEmo.open("/EMYS_EmoIn"); // open the port bTrack.open("/EMYS_TrackIn"); // open the port //bTrack.setStrict(true); //bEmo.setStrict(true); //bTTS.setStrict(true); bTrack.setReporter(myPortStatus); // set reporter, this is important bEmo.setReporter(myPortStatus); // set reporter, this is important bTTS.setReporter(myPortStatus); // set reporter, this is important bTalking=false; puts("started EMYS rcv"); }
void SamInit(void) { RecognisePort("Out"); // name the port to be shown in the gui StartModule("/Star"); bStarSend.open("/Star_Out"); // open the port bStarSend.setReporter(myPortStatus); // set reporter, this is important puts("started stargazer"); }
void SamInit(void) { iVoltage=0; task=""; bCharging=true; RecognisePort("PIn"); RecognisePort("PhoneOut"); StartModule("/Phidget"); bRead.open("/Phidget_PIn"); bPhone.open("/Phidget_PhoneOut"); bRead.setStrict(true); bPhone.setStrict(true); bRead.setReporter(myPortStatus); bPhone.setReporter(myPortStatus); //relay switch: on mobile base and start modules CPhidgetInterfaceKit_setOutputState (ifKit, 6, 1); yarp::os::Time::delay(2); system("start.bat"); }
void SamInit(void) { RecognisePort("StarIn"); RecognisePort("GoalIn"); //RecognisePort("PwrOut"); //RecognisePort("LaserIn"); StartModule("/GotoNav"); StarIn.open("/GotoNav_StarIn"); GoalIn.open("/GotoNav_GoalIn"); //PwrOut.open("/GotoNav_PwrOut"); //LaserIn.open("/GotoNav_LaserIn"); StarIn.setStrict(true); GoalIn.setStrict(true); //PwrOut.setStrict(true); //LaserIn.setStrict(true); StarIn.setReporter(myPortStatus); GoalIn.setReporter(myPortStatus); //PwrOut.setReporter(myPortStatus); //LaserIn.setReporter(myPortStatus); //myfile.open ("motion.txt"); //if (myfile.is_open()) //{ // myfile << 0 << "|" << 0 << "\n"; // myfile.close(); //} //system("move.exe"); yarp::os::Time::delay(0.5); puts("started nav go to"); }
void SamInit(void) { puts("in laser"); laser.setSerialPort("COM10"); puts("set serial \n Starting laser, this may take a minute"); bool TurnedOn = false; while(!TurnedOn) // sometimes the coms are busy, wait untill we get what we want { try{TurnedOn = laser.turnOn();} catch (...){} } puts("laser turned on"); RecognisePort("Out"); StartModule("/Laser"); myfirst.open("/Laser_Out"); //myPortStatus myfirst.setReporter(myPortStatus); }