This repository has been archived by the owner on Aug 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MachineInterface.pde
82 lines (68 loc) · 2.61 KB
/
MachineInterface.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
By Chris Eugene Mills
Private methods not allowed? Must be implemented on each unique class.
*/
interface Machine {
public void connect();
// private void motorSettingsSetup();
public void clone(AxiDrawMachine _clone);
// MODES and UTILS ///////////////////////////////////////////////////////////
public void alignmentMode();
public void setRelativeMode();
public void setAbsoluteMode();
public void setInchesMode();
public void setMillimeterMode();
// SHORTCUTS
public void goHome();
// ACCESS UTILITIES
public int[] getPositionAB();
public float[] getPositionUnits();
public float getAMaxUnits();
public float getBMaxUnits();
public float[] getPositionPercent();
public float[] getDestPercent();
public float[] getRealPositionPercent();
public int getNextMoveTime();
public boolean isConnected();
public boolean isAbsoluteMode();
public boolean isPenDown();
public boolean isRealPenDown();
// TIMING/ESTIMATION
public void startEstimation();
public void endEstimation();
// PRIVATE UTILITIES
// private int unitsToSteps( float x );
// private int mmToSteps( float x );
// private int inToSteps( float x );
// private float stepsToUnits( int x );
// private float getDistance( float x1, float y1, float x2, float y2 );
// MACHINE OPERATIONS ////////////////////////////////////////////////////////
public void configPenSpeeds( int downSpeed, int upSpeed );
public void configPenHeights( int downPct, int upPct );
public void raisePen();
public void raisePen( int penDelay );
public void lowerPen();
public void lowerPen( int penDelay );
public void togglePen();
// private void motorsOn( int stepperResolution )
public void motorsOff();
public void zero();
public void configMotorSpeeds( int downPct, int upPct );
public void move( float a, float b );
public void moveRelativeUnits( float aD, float bD );
public void moveRelativeAB( int aD, int bD );
public void moveToPct( float aPct, float bPct );
public void moveToUnits( float aLoc, float bLoc );
public void moveToAB( int aLoc, int bLoc );
// MACHINE SENDING ///////////////////////////////////////////////////////////
// private boolean send( String str );
// private boolean waitForOK();
// private boolean waitLoop();
// MACHINE QUERYING //////////////////////////////////////////////////////////
// private String query( String send );
public int queryPenUp();
public int queryPRGButton();
public int[] queryMotorMoving();
public int queryBufferFull();
public int[] queryMotorStep();
}