{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

backtrack - Copy (2) -...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
#include "backtrack.h" #include "stack" #include "Point.h" #include "Aria.h" #include <string> #include <stdio.h> #include <iostream> #include <sstream> #include <iomanip> #include <fstream> #include <math.h> using namespace std; u stack<Point> motorMap; bool redFoundFlag; ArRobot *myRobot; time_t last; t ActionBack::ActionBack() : ArAction("Back") { redFoundFlag = false; last = time ( NULL ); myHeading=0; } /* Sets the myRobot pointer (all setRobot overloaded functions must do this), finds the sonar device from the robot, and if the sonar isn't there, then it deactivates itself. */ void ActionBack::setRobot(ArRobot *robot) { myRobot = robot; ArAction::setRobot(robot); } /* This is the guts of the Back action. */ ArActionDesired *ActionBack::fire(ArActionDesired currentDesired) { myDesired.reset(); m ifstream robodatafile; robodatafile.open("C://robodata/data.txt"); r char output[100]; if (robodatafile.is_open()) { robodatafile.getline(output, 100); cout<<output; c } robodatafile.close();
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
int d1; int d2; int redSize = 0; char buff[512]; c sscanf(output, "%d;%d;%d", &d1,&d2,&redSize); cout << "Red Size: " << redSize <<endl;
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}