Compare commits

..

No commits in common. "master" and "v2.6.0" have entirely different histories.

5 changed files with 7 additions and 28 deletions

View File

@ -322,9 +322,6 @@ RShape loadShapeFromGCodeFile(String filename) {
drawLine = false; drawLine = false;
} }
} }
else { // if there is no Z axis, assume it's always on
// drawLine = true; // this isn't always safe!
}
Float x = ins.get("X"); Float x = ins.get("X");
Float y = ins.get("Y"); Float y = ins.get("Y");

View File

@ -13,7 +13,5 @@ This is a desktop application for controlling a polargraph machine, communicatin
The [latest releases bundle] (https://github.com/euphy/polargraphcontroller/releases/latest) contains The [latest releases bundle] (https://github.com/euphy/polargraphcontroller/releases/latest) contains
copies of all the libraries that I use, as well as all the source, and compiled versions of the code where sensible. copies of all the libraries that I use, as well as all the source, and compiled versions of the code where sensible.
How to [run it from source](https://github.com/euphy/polargraph/wiki/Running-the-controller-from-source-code).
sandy.noble@gmail.com sandy.noble@gmail.com
http://www.polargraph.co.uk/ http://www.polargraph.co.uk/

View File

@ -533,14 +533,12 @@ void numberbox_mode_changeMachineWidth(float value)
clearBoxVectors(); clearBoxVectors();
float steps = getDisplayMachine().inSteps((int) value); float steps = getDisplayMachine().inSteps((int) value);
getDisplayMachine().getSize().x = steps; getDisplayMachine().getSize().x = steps;
getDisplayMachine().maxLength = null;
} }
void numberbox_mode_changeMachineHeight(float value) void numberbox_mode_changeMachineHeight(float value)
{ {
clearBoxVectors(); clearBoxVectors();
float steps = getDisplayMachine().inSteps((int) value); float steps = getDisplayMachine().inSteps((int) value);
getDisplayMachine().getSize().y = steps; getDisplayMachine().getSize().y = steps;
getDisplayMachine().maxLength = null;
} }
void numberbox_mode_changeMMPerRev(float value) void numberbox_mode_changeMMPerRev(float value)
{ {
@ -617,7 +615,7 @@ void button_mode_sendPenWidth()
NumberFormat nf = NumberFormat.getNumberInstance(Locale.UK); NumberFormat nf = NumberFormat.getNumberInstance(Locale.UK);
DecimalFormat df = (DecimalFormat)nf; DecimalFormat df = (DecimalFormat)nf;
df.applyPattern("###.##"); df.applyPattern("###.##");
addToRealtimeCommandQueue(CMD_SETPENWIDTH+df.format(currentPenWidth)+",END"); addToRealtimeCommandQueue(CMD_CHANGEPENWIDTH+df.format(currentPenWidth)+",END");
} }
void numberbox_mode_changePenTestStartWidth(float value) void numberbox_mode_changePenTestStartWidth(float value)

View File

@ -27,9 +27,9 @@
https://github.com/euphy/polargraphcontroller https://github.com/euphy/polargraphcontroller
*/ */
static final String CMD_CHANGELENGTH = "C01,"; static final String CMD_CHANGELENGTH = "C01,";
static final String CMD_SETPENWIDTH = "C02,"; static final String CMD_CHANGEPENWIDTH = "C02,";
//static final String CMD_CHANGEMOTORSPEED = "C03,"; static final String CMD_CHANGEMOTORSPEED = "C03,";
//static final String CMD_CHANGEMOTORACCEL = "C04,"; static final String CMD_CHANGEMOTORACCEL = "C04,";
static final String CMD_DRAWPIXEL = "C05,"; static final String CMD_DRAWPIXEL = "C05,";
static final String CMD_DRAWSCRIBBLEPIXEL = "C06,"; static final String CMD_DRAWSCRIBBLEPIXEL = "C06,";
static final String CMD_DRAWRECT = "C07,"; static final String CMD_DRAWRECT = "C07,";

View File

@ -685,7 +685,7 @@ void addEventListeners()
void preLoadCommandQueue() void preLoadCommandQueue()
{ {
addToCommandQueue(CMD_SETPENWIDTH+currentPenWidth+",END"); addToCommandQueue(CMD_CHANGEPENWIDTH+currentPenWidth+",END");
addToCommandQueue(CMD_SETMOTORSPEED+currentMachineMaxSpeed+",END"); addToCommandQueue(CMD_SETMOTORSPEED+currentMachineMaxSpeed+",END");
addToCommandQueue(CMD_SETMOTORACCEL+currentMachineAccel+",END"); addToCommandQueue(CMD_SETMOTORACCEL+currentMachineAccel+",END");
} }
@ -819,7 +819,6 @@ Panel getPanel(String panelName)
void drawImagePage() void drawImagePage()
{ {
noLoop();
strokeWeight(1); strokeWeight(1);
background(getBackgroundColour()); background(getBackgroundColour());
noFill(); noFill();
@ -844,21 +843,13 @@ void drawImagePage()
showGroupBox(); showGroupBox();
showCurrentMachinePosition(); showCurrentMachinePosition();
try { if (displayingQueuePreview)
if (displayingQueuePreview) previewQueue();
previewQueue();
}
catch (ConcurrentModificationException cme)
{
// not doing anything with this exception - I don't mind if it's wrong on the screen for a second or two.
println("Caught the pesky ConcurrentModificationException: " + cme.getMessage());
}
if (displayingInfoTextOnInputPage) if (displayingInfoTextOnInputPage)
showText(250,45); showText(250,45);
drawStatusText((int)statusTextPosition.x, (int)statusTextPosition.y); drawStatusText((int)statusTextPosition.x, (int)statusTextPosition.y);
showCommandQueue((int) getDisplayMachine().getOutline().getRight()+6, 20); showCommandQueue((int) getDisplayMachine().getOutline().getRight()+6, 20);
} }
void drawMachineOutline() void drawMachineOutline()
@ -1376,7 +1367,6 @@ void keyPressed()
} }
void mouseDragged() void mouseDragged()
{ {
loop();
if (mouseOverControls().isEmpty()) if (mouseOverControls().isEmpty())
{ {
if (mouseButton == CENTER) if (mouseButton == CENTER)
@ -1394,10 +1384,6 @@ void mouseDragged()
} }
} }
} }
void mouseMoved()
{
loop();
}
void mouseClicked() void mouseClicked()
{ {