backtrack - Copy (2) - #include "backtrack.h"...

Info iconThis preview shows pages 1–2. 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 DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 07/19/2011 for the course ECE 101 taught by Professor Chu during the Spring '11 term at Punjab Engineering College.

Page1 / 3

backtrack - Copy (2) - #include &quot;backtrack.h&quot;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online