Subversion Repositories seema-scanner

Rev

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

Rev Author Line No. Line
9 jakw 1
#ifndef ROTATIONSTAGE_H
2
#define ROTATIONSTAGE_H
3
 
4
#include <stdio.h>
5
#include <string>
223 flgw 6
#include <mutex>
9 jakw 7
extern "C" {
8
    #include "ArcusPerformaxDriver.h"
9
}
10
 
11
class RotationStage{
12
    public:
13
        RotationStage();
207 flgw 14
        ~RotationStage();
9 jakw 15
 
16
        // Send raw command
10 jakw 17
        bool executeStringCommand(std::string cmd);
9 jakw 18
 
10 jakw 19
        // Send raw command and get return string
20
        bool executeStringCommand(std::string cmd, std::string &ret);
9 jakw 21
 
10 jakw 22
        // Move to the desired angle in degrees, measured from the the current position
23
        void moveRelative(float angle);
24
 
25
        // Move to the desired angle in degrees, measured from the the initial position
26
        void moveAbsolute(float angle);
27
 
28 jakw 28
        // Get the current angular position in degrees
29
        float getAngle();
30
 
92 jakw 31
        // Returns whether the motor is currently moving
32
        bool isMoving();
33
 
28 jakw 34
        // Wait/block until motor is idle
35
        void wait();
207 flgw 36
        AR_HANDLE Handle;
9 jakw 37
    private:
14 jakw 38
        int microSteps;
223 flgw 39
        std::mutex mutex;
9 jakw 40
};
41
 
42
#endif // ROTATIONSTAGE_H