Subversion Repositories seema-scanner

Rev

Rev 15 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#include "RotationStage.h"
#include <iostream>

int main(int argc, char *argv[]){

    RotationStage rotationStage;

//    try {

//    } catch (char* e) {
//        std::cerr << "Could not create rotation stage object. " << e << std::endl;
//    }

//    rotationStage.moveAbsolute(360);
//    rotationStage.wait();

    std::cout << rotationStage.getAngle() << std::endl;

    rotationStage.moveAbsolute(5.0);
    rotationStage.wait();
    std::cout << rotationStage.getAngle() << std::endl;

    rotationStage.moveAbsolute(354.0);
    rotationStage.wait();
    std::cout << rotationStage.getAngle() << std::endl;

    rotationStage.moveAbsolute(350.0);
    rotationStage.wait();
    std::cout << rotationStage.getAngle() << std::endl;

    rotationStage.moveAbsolute(2.0);
    rotationStage.wait();
    std::cout << rotationStage.getAngle() << std::endl;

    rotationStage.moveAbsolute(7.0);
    rotationStage.wait();
    std::cout << rotationStage.getAngle() << std::endl;

    rotationStage.moveAbsolute(187.0);
    rotationStage.wait();
    std::cout << rotationStage.getAngle() << std::endl;

//    rotationStage.moveAbsolute(0.0);
//    rotationStage.wait();

//    for(float i=9.8345; i<40; i+=10){
//        rotationStage.moveAbsolute((float)i);
//        rotationStage.wait();
//        std::cout << "Position: " << rotationStage.getPosition() << std::endl;
//    }

//    for(float i=0; i<36; i++){
//        rotationStage.moveRelative(10.0);
//        rotationStage.wait();
//        std::cout << "Position: " << rotationStage.getAngle() << std::endl;
//    }

//    rotationStage.moveAbsolute(0);
//    rotationStage.wait();
//    std::cout << "Position: " << rotationStage.getPosition() << std::endl;

    return 0;
}