Rename ActiveValue to GetValue, consolidate GetValue overrides
This commit is contained in:
parent
64fef954d9
commit
c008234248
17 changed files with 66 additions and 73 deletions
|
|
@ -96,7 +96,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
public void DoPause()
|
||||
{
|
||||
// Add the pause_gcode to the loadedGCode.GCodeCommandQueue
|
||||
string pauseGCode = ActiveSliceSettings.Instance.ActiveValue("pause_gcode");
|
||||
string pauseGCode = ActiveSliceSettings.Instance.GetValue("pause_gcode");
|
||||
|
||||
// put in the gcode for pausing (if any)
|
||||
InjectPauseGCode(pauseGCode);
|
||||
|
|
@ -114,7 +114,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
InjectPauseGCode("G0 X{0:0.000} Y{1:0.000} Z{2:0.000} F{3}".FormatWith(ensureAllAxis.x, ensureAllAxis.y, ensureAllAxis.z, moveLocationAtEndOfPauseCode.feedRate + 1));
|
||||
InjectPauseGCode("G0 X{0:0.000} Y{1:0.000} Z{2:0.000} F{3}".FormatWith(positionBeforeActualPause.x, positionBeforeActualPause.y, positionBeforeActualPause.z, moveLocationAtEndOfPauseCode.feedRate));
|
||||
|
||||
string resumeGCode = ActiveSliceSettings.Instance.ActiveValue("resume_gcode");
|
||||
string resumeGCode = ActiveSliceSettings.Instance.GetValue("resume_gcode");
|
||||
InjectPauseGCode(resumeGCode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
|
||||
// if top homing, home the extruder
|
||||
case ResumeState.Homing:
|
||||
if (ActiveSliceSettings.Instance.ActiveValue("z_homes_to_max") == "1")
|
||||
if (ActiveSliceSettings.Instance.GetValue("z_homes_to_max") == "1")
|
||||
{
|
||||
queuedCommands.Add("G28");
|
||||
}
|
||||
|
|
@ -162,7 +162,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
// let's prime the extruder, move to a good position over the part, then start printing
|
||||
queuedCommands.Add("G1 E5");
|
||||
queuedCommands.Add("G1 E4");
|
||||
if (ActiveSliceSettings.Instance.ActiveValue("z_homes_to_max") == "0") // we are homed to the bed
|
||||
if (ActiveSliceSettings.Instance.GetValue("z_homes_to_max") == "0") // we are homed to the bed
|
||||
{
|
||||
// move to the height we can resume printing from
|
||||
Vector2 resumePositionXy = ActiveSliceSettings.Instance.ActiveVector2("resume_position_before_z_home");
|
||||
|
|
@ -199,7 +199,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
|
||||
double feedRate;
|
||||
|
||||
string firstLayerSpeed = ActiveSliceSettings.Instance.ActiveValue("resume_first_layer_speed");
|
||||
string firstLayerSpeed = ActiveSliceSettings.Instance.GetValue("resume_first_layer_speed");
|
||||
if (!double.TryParse(firstLayerSpeed, out feedRate))
|
||||
{
|
||||
feedRate = 10;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue