v1.2 Added g-code importing. And that weird cord offset thing

This commit is contained in:
Sandy Noble 2015-05-17 23:40:51 +01:00
parent 111a9b9478
commit 7aba28e403
11 changed files with 629 additions and 483 deletions

View File

@ -1,32 +1,32 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
This file is part of Polargraph Controller.
Polargraph Controller is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Polargraph Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
*/
Polargraph controller
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
Polargraph Controller is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Polargraph Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
sandy.noble@gmail.com
http://www.polargraph.co.uk/
https://github.com/euphy/polargraphcontroller
*/
class DisplayMachine extends Machine
{
private Rectangle outline = null;

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,12 +24,8 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
*/
/**
*
*
*
https://github.com/euphy/polargraphcontroller
*/
class Machine
{

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,7 +24,8 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
https://github.com/euphy/polargraphcontroller
*/
class Scaler

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,7 +24,8 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
https://github.com/euphy/polargraphcontroller
*/
class Panel
{

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,7 +24,8 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
https://github.com/euphy/polargraphcontroller
*/
class Rectangle
{

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,9 +24,10 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
https://github.com/euphy/polargraphcontroller
*/
void button_mode_begin()
void button_mode_begin()
{
button_mode_clearQueue();
}
@ -719,4 +720,10 @@ void button_mode_sendButtonDeactivate()
addToCommandQueue(CMD_DEACTIVATE_MACHINE_BUTTON+",END");
}
void numberbox_mode_previewCordOffsetValue(int value)
{
previewCordOffset = value;
lastCommandQueueHash = 0;
}

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,7 +24,8 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
https://github.com/euphy/polargraphcontroller
*/

View File

@ -1,31 +1,33 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
This file is part of Polargraph Controller.
Polargraph Controller is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Polargraph Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
*/
Polargraph controller
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
Polargraph Controller is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Polargraph Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
sandy.noble@gmail.com
http://www.polargraph.co.uk/
https://github.com/euphy/polargraphcontroller
*/
Set<String> getPanelNames()
{
if (this.panelNames == null)
@ -500,6 +502,12 @@ Map<String, Controller> initialiseNumberboxValues(Map<String, Controller> map)
n.setMax(PATH_LENGTH_HIGHPASS_CUTOFF_MAX);
n.setMultiplier(0.5);
}
else if (MODE_ADJUST_PREVIEW_CORD_OFFSET.equals(key))
{
n.setDecimalPrecision(1);
n.setValue(0);
n.setMultiplier(0.5);
}
}
}
return map;
@ -688,6 +696,8 @@ List<String> getControlNamesForInputPanel()
controlNames.add(MODE_CHANGE_MIN_VECTOR_LINE_LENGTH);
//controlNames.add(MODE_VECTOR_PATH_LENGTH_HIGHPASS_CUTOFF);
controlNames.add(MODE_RENDER_VECTORS);
controlNames.add(MODE_ADJUST_PREVIEW_CORD_OFFSET);
controlNames.add(MODE_SHOW_IMAGE);
controlNames.add(MODE_SHOW_VECTOR);
@ -784,7 +794,7 @@ List<String> getControlNamesForDetailPanel()
controlNames.add(MODE_SEND_BUTTON_ACTIVATE);
controlNames.add(MODE_SEND_BUTTON_DEACTIVATE);
controlNames.add(MODE_CHANGE_SERIAL_PORT);
return controlNames;
@ -960,6 +970,8 @@ Map<String, String> buildControlLabels()
result.put(MODE_SEND_BUTTON_ACTIVATE, "Activate button");
result.put(MODE_SEND_BUTTON_DEACTIVATE, "Deactivate button");
result.put(MODE_ADJUST_PREVIEW_CORD_OFFSET, "Preview cord offset");
return result;
}
@ -1103,6 +1115,7 @@ Set<String> buildControlNames()
result.add(MODE_SEND_BUTTON_ACTIVATE);
result.add(MODE_SEND_BUTTON_DEACTIVATE);
result.add(MODE_ADJUST_PREVIEW_CORD_OFFSET);
return result;
}

View File

@ -1,31 +1,32 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
This file is part of Polargraph Controller.
Polargraph Controller is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Polargraph Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
*/
Polargraph controller
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
Polargraph Controller is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Polargraph Controller is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Polargraph Controller. If not, see <http://www.gnu.org/licenses/>.
Requires the excellent ControlP5 GUI library available from http://www.sojamo.de/libraries/controlP5/.
Requires the excellent Geomerative library available from http://www.ricardmarxer.com/geomerative/.
This is an application for controlling a polargraph machine, communicating using ASCII command language over a serial link.
sandy.noble@gmail.com
http://www.polargraph.co.uk/
https://github.com/euphy/polargraphcontroller
*/
static final String CMD_CHANGELENGTH = "C01,";
static final String CMD_CHANGEPENWIDTH = "C02,";
static final String CMD_CHANGEMOTORSPEED = "C03,";

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/**
Polargraph controller
Copyright Sandy Noble 2012.
Copyright Sandy Noble 2015.
This file is part of Polargraph Controller.
@ -24,7 +24,8 @@
sandy.noble@gmail.com
http://www.polargraph.co.uk/
http://code.google.com/p/polargraph/
https://github.com/euphy/polargraphcontroller
*/
Set<Panel> getPanelsForTab(String tabName)