mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 13:41:13 +00:00
These are all design documents that I thought I had lost. It's may make me cringe, but it's still cool to use it to see how far I've come.
50 lines
725 B
C++
50 lines
725 B
C++
#ifndef AXIS_CLASS_H
|
|
#define AXIS_CLASS_H
|
|
const unsigned char Microstep[6][3] = {
|
|
{
|
|
0, 0, 0
|
|
}
|
|
,
|
|
{
|
|
1, 0, 0
|
|
}
|
|
,
|
|
{
|
|
0, 1, 0
|
|
}
|
|
,
|
|
{
|
|
1, 1, 0
|
|
}
|
|
,
|
|
{
|
|
0, 0, 1
|
|
}
|
|
,
|
|
{
|
|
1, 0, 1
|
|
}
|
|
};
|
|
|
|
class Axis {
|
|
private:
|
|
unsigned char p_Step;
|
|
unsigned char p_Dir;
|
|
unsigned char p_M0;
|
|
unsigned char p_M1;
|
|
unsigned char p_M2;
|
|
unsigned char p_Fault;
|
|
|
|
unsigned int DelVal;
|
|
|
|
public:
|
|
Axis (unsigned char AxisStep, unsigned char AxisDir, unsigned char AxisM0, unsigned char AxisM1, unsigned char AxisM2, unsigned char AxisFault);
|
|
void SetMicrostep(unsigned char Level);
|
|
void StepForward();
|
|
void StepBackward();
|
|
int SetRPM(int RPM);
|
|
void SetDelay(unsigned int delLen);
|
|
};
|
|
#endif
|
|
|