Subversion Repositories seema-scanner

Rev

Rev 207 | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef ROTATIONSTAGE_H
#define ROTATIONSTAGE_H

#include <stdio.h>
#include <string>
#include <mutex>
extern "C" {
    #include "ArcusPerformaxDriver.h"
}

class RotationStage{
    public:
        RotationStage();
        ~RotationStage();

        // Send raw command
        bool executeStringCommand(std::string cmd);

        // Send raw command and get return string
        bool executeStringCommand(std::string cmd, std::string &ret);

        // Move to the desired angle in degrees, measured from the the current position
        void moveRelative(float angle);

        // Move to the desired angle in degrees, measured from the the initial position
        void moveAbsolute(float angle);

        // Get the current angular position in degrees
        float getAngle();
        
        // Returns whether the motor is currently moving
        bool isMoving();

        // Wait/block until motor is idle
        void wait();
        AR_HANDLE Handle;
    private:
        int microSteps;
        std::mutex mutex;
};

#endif // ROTATIONSTAGE_H