software/testing/STM32_PeripheralController/RPI/SRC/Path.cpp
void PathGroup::determinePathTravels(std::string &pathTravels) {
    int counter = 0;
    std::istringstream paths(pathTravels);
    std::string line;
    int scanfError = 0;
    float targetX, targetY;

        while (std::getline(paths, line) && (counter < MAX_NUM_PATH_TRAVELS)) {

            // print out read line
            std::cout << line << std::endl;

            // parse informations from file:
            scanfError = sscanf(line.c_str(), "%f;%f", &targetX, &targetY);

            this->travels[counter] = new PathTravel(targetX, targetY, 0.0f);

            if (scanfError <= 0)
                break;

            counter++;
        }
}
/** determine path travels from internal sources */
determine path travels from internal sources
determine path travels from internal sources
void PathGroup::determinePathTravels(std::string &pathTravels) {
    int counter = 0;
    std::istringstream paths(pathTravels);
    std::string line;
    int scanfError = 0;
    float targetX, targetY;
        while (std::getline(paths, line) && (counter < MAX_NUM_PATH_TRAVELS)) {
            std::cout << line << std::endl;
            scanfError = sscanf(line.c_str(), "%f;%f", &targetX, &targetY);
            this->travels[counter] = new PathTravel(targetX, targetY, 0.0f);
            if (scanfError <= 0)
                break;
            counter++;
        }
}
void PathGroup :: determinePathTravels ( std :: string & pathTravels ) { int counter = 0 ; std :: istringstream paths ( pathTravels ) ; std :: string line ; int scanfError = 0 ; float targetX , targetY ; while ( std :: getline ( paths , line ) && ( counter < MAX_NUM_PATH_TRAVELS ) ) { std :: cout << line << std :: endl ; scanfError = sscanf ( line . c_str ( ) , " " , & targetX , & targetY ) ; this -> travels [ counter ] = new PathTravel ( targetX , targetY , 0.0f ) ; if ( scanfError <= 0 ) break ; counter ++ ; } }
determine path travels from internal sources
determine path travels from internal sources
// print out read line // parse informations from file: