Skip to content
Snippets Groups Projects
Commit e830f78b authored by Thomas Oster's avatar Thomas Oster
Browse files

Frequency support optional for LAOS

parent b383fe6a
No related branches found
No related tags found
No related merge requests found
......@@ -65,8 +65,21 @@ public class LaosCutter extends LaserCutter
private static final String SETTING_DEBUGFILE = "Debug output file";
private static final String SETTING_SUPPORTS_PURGE = "Supports purge";
private static final String SETTING_SUPPORTS_VENTILATION = "Supports ventilation";
private static final String SETTING_SUPPORTS_FREQUENCY = "Supports frequency";
private static final String SETTING_SUPPORTS_FOCUS = "Supports focus (Z-axis movement)";
private boolean supportsFrequency = false;
public boolean isSupportsFrequency()
{
return supportsFrequency;
}
public void setSupportsFrequency(boolean supportsFrequency)
{
this.supportsFrequency = supportsFrequency;
}
private boolean supportsFocus = false;
public boolean isSupportsFocus()
......@@ -109,19 +122,19 @@ public class LaosCutter extends LaserCutter
@Override
public LaosCutterProperty getLaserPropertyForVectorPart()
{
return new LaosCutterProperty(!this.supportsPurge, !this.supportsVentilation, !this.supportsFocus);
return new LaosCutterProperty(!this.supportsPurge, !this.supportsVentilation, !this.supportsFocus, !this.supportsFrequency);
}
@Override
public LaosCutterProperty getLaserPropertyForRasterPart()
{
return new LaosCutterProperty(!this.supportsPurge, !this.supportsVentilation, !this.supportsFocus);
return new LaosCutterProperty(!this.supportsPurge, !this.supportsVentilation, !this.supportsFocus, !this.supportsFrequency);
}
@Override
public LaosCutterProperty getLaserPropertyForRaster3dPart()
{
return new LaosCutterProperty(!this.supportsPurge, !this.supportsVentilation, !this.supportsFocus);
return new LaosCutterProperty(!this.supportsPurge, !this.supportsVentilation, !this.supportsFocus, !this.supportsFrequency);
}
public void setEngraveUnidirectional(boolean uni)
......@@ -416,7 +429,10 @@ public class LaosCutter extends LaserCutter
}
setSpeed(out, prop.getSpeed());
setPower(out, prop.getPower());
setFrequency(out, prop.getFrequency());
if (this.supportsFrequency)
{
setFrequency(out, prop.getFrequency());
}
}
else
{
......@@ -800,6 +816,7 @@ public class LaosCutter extends LaserCutter
SETTING_SUPPORTS_VENTILATION,
SETTING_SUPPORTS_PURGE,
SETTING_SUPPORTS_FOCUS,
SETTING_SUPPORTS_FREQUENCY,
SETTING_TFTP,
SETTING_RASTER_WHITESPACE,
SETTING_DEBUGFILE
......@@ -822,6 +839,10 @@ public class LaosCutter extends LaserCutter
{
return (Double) this.getAddSpacePerRasterLine();
}
else if (SETTING_SUPPORTS_FREQUENCY.equals(attribute))
{
return (Boolean) this.supportsFrequency;
}
else if (SETTING_SUPPORTS_PURGE.equals(attribute))
{
return (Boolean) this.supportsPurge;
......@@ -884,6 +905,10 @@ public class LaosCutter extends LaserCutter
{
this.setAddSpacePerRasterLine((Double) value);
}
else if (SETTING_SUPPORTS_FREQUENCY.equals(attribute))
{
this.setSupportsFrequency((Boolean) value);
}
else if (SETTING_SUPPORTS_PURGE.equals(attribute))
{
this.setSupportsPurge((Boolean) value);
......@@ -949,6 +974,7 @@ public class LaosCutter extends LaserCutter
clone.useTftp = useTftp;
clone.addSpacePerRasterLine = addSpacePerRasterLine;
clone.unidir = unidir;
clone.supportsFrequency = supportsFrequency;
clone.supportsPurge = supportsPurge;
clone.supportsVentilation = supportsVentilation;
clone.supportsFocus = supportsFocus;
......
......@@ -31,19 +31,21 @@ public class LaosCutterProperty extends FloatPowerSpeedFocusFrequencyProperty {
private boolean hidePurge = false;
private boolean hideVentilation = false;
private boolean hideFocus = false;
private boolean hideFrequency = false;
private boolean ventilation = true;
public LaosCutterProperty(boolean hidePurge, boolean hideVentilation, boolean hideFocus)
public LaosCutterProperty(boolean hidePurge, boolean hideVentilation, boolean hideFocus, boolean hideFrequency)
{
this.hidePurge = hidePurge;
this.hideVentilation = hideVentilation;
this.hideFocus = hideFocus;
this.hideFrequency = hideFrequency;
}
public LaosCutterProperty()
{
this(false, false, false);
this(false, false, false, false);
}
/**
......@@ -96,6 +98,10 @@ public class LaosCutterProperty extends FloatPowerSpeedFocusFrequencyProperty {
{
result.remove("focus");
}
if (this.hideFrequency)
{
result.remove("frequency");
}
if (!this.hideVentilation)
{
result.add("ventilation");
......@@ -104,6 +110,7 @@ public class LaosCutterProperty extends FloatPowerSpeedFocusFrequencyProperty {
{
result.add("purge");
}
return result.toArray(new String[0]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment