adding in C axis

This commit is contained in:
LarsBrubaker 2020-05-01 07:51:44 -07:00
parent d2a5f746a5
commit 7b2d95bbd9
7 changed files with 39 additions and 5 deletions

View file

@ -176,6 +176,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
SettingsKey.filament_1_has_been_loaded,
SettingsKey.filament_runout_sensor,
SettingsKey.firmware_type,
SettingsKey.has_c_axis,
SettingsKey.has_fan,
SettingsKey.has_hardware_leveling,
SettingsKey.has_heated_bed,

View file

@ -109,6 +109,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
public const string g0 = nameof(g0);
public const string gcode_flavor = nameof(gcode_flavor);
public const string gcode_output_type = nameof(gcode_output_type);
public const string has_c_axis = nameof(has_c_axis);
public const string has_fan = nameof(has_fan);
public const string has_hardware_leveling = nameof(has_hardware_leveling);
public const string has_heated_bed = nameof(has_heated_bed);

View file

@ -723,6 +723,19 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
RebuildGCodeOnChange = false
},
new SliceSettingData()
{
SlicerConfigName = SettingsKey.has_c_axis,
PresentationName = "Has C Axis".Localize(),
HelpText = "The printer has a c axis used by too changer (e3d quad extruder).".Localize(),
DataEditType = DataEditTypes.CHECK_BOX,
ShowAsOverride = true,
ShowIfSet = "!sla_printer",
ResetAtEndOfPrint = false,
DefaultValue = "0",
ReloadUiWhenChanged = true,
RebuildGCodeOnChange = false
},
new SliceSettingData()
{
SlicerConfigName = SettingsKey.has_z_servo,
PresentationName = "Has Z Servo".Localize(),

View file

@ -424,7 +424,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication
Y = 2,
Z = 4,
E = 8,
XYZ = X | Y | Z
XYZ = X | Y | Z,
C = 16, // used by e3d quad extruder
}
public double ActualBedTemperature
@ -1371,20 +1372,25 @@ Make sure that your printer is turned on. Some printers will appear to be connec
// If we are homing everything we don't need to add any details
if (!axis.HasFlag(Axis.XYZ))
{
if ((axis & Axis.X) == Axis.X)
if (axis.HasFlag(Axis.X))
{
command += " X0";
}
if ((axis & Axis.Y) == Axis.Y)
if (axis.HasFlag(Axis.Y))
{
command += " Y0";
}
if ((axis & Axis.Z) == Axis.Z)
if (axis.HasFlag(Axis.Z))
{
command += " Z0";
}
if (axis.HasFlag(Axis.C))
{
command += " C0";
}
}
QueueLine(command);

View file

@ -156,6 +156,18 @@ namespace MatterHackers.MatterControl.PrinterControls
homeZButton.Click += (s, e) => printer.Connection.HomeAxis(PrinterConnection.Axis.Z);
toolbar.AddChild(homeZButton);
if (printer.Settings.GetValue<bool>(SettingsKey.has_c_axis))
{
var homeCButton = new TextButton("C", theme)
{
ToolTipText = "Home C".Localize(),
BackgroundColor = theme.MinimalShade,
Margin = theme.ButtonSpacing
};
homeCButton.Click += (s, e) => printer.Connection.HomeAxis(PrinterConnection.Axis.C);
toolbar.AddChild(homeCButton);
}
int extruderCount = printer.Settings.GetValue<int>(SettingsKey.extruder_count);
// Display the current baby step offset stream values

View file

@ -206,6 +206,7 @@ Printer
filament_runout_sensor
has_z_probe
has_z_servo
has_c_axis
enable_network_printing
enable_sailfish_communication
sla_printer

@ -1 +1 @@
Subproject commit 6daf0288a22655b275bea252caeb5264f003747e
Subproject commit 9371fc13d7e56ded89f67453578996a2dd79936d