Added an error for bed temp set when bed surface is set

This commit is contained in:
LarsBrubaker 2022-03-26 18:50:58 -07:00
parent b16c2a26e6
commit 9bec1e0274
3 changed files with 24 additions and 0 deletions

View file

@ -68,6 +68,7 @@ namespace MatterHackers.MatterControl
public static readonly string ItemToAMFExportInvalid = nameof(ItemToAMFExportInvalid);
public static readonly string ItemToSTLExportInvalid = nameof(ItemToSTLExportInvalid);
public static readonly string MaterialNotSelected = nameof(MaterialNotSelected);
public static readonly string BedTemperatureError = nameof(BedTemperatureError);
public static readonly string NoItemsToExport = nameof(NoItemsToExport);
public static readonly string NoPrintableParts = nameof(NoPrintableParts);
public static readonly string NoZipItemsToExport = nameof(NoZipItemsToExport);

View file

@ -611,6 +611,23 @@ namespace MatterHackers.MatterControl
ErrorLevel = ValidationErrorLevel.Warning,
});
}
// we only check for bad bed temperature if we have not show an incompatable message
else if (printer.Connection.IsConnected
&& !PrinterSetupRequired(printer)
&& validatePrintBed
&& errors.Count(e => e.ErrorLevel == ValidationErrorLevel.Error) == 0
&& printer.PrintableItems(printer.Bed.Scene).Any()
&& settingsContext.GetValue<bool>(SettingsKey.has_swappable_bed)
&& settingsContext.GetValue(SettingsKey.bed_surface) != "Blue Tape")
{
errors.Add(new ValidationError(ValidationErrors.BedTemperatureError)
{
Error = "Bed Temperature Set to 0".Localize(),
Details = "The temperature for the 'Bed Surface' you have selected is set to 0. You may get poor bed adhesion or printing results. You can change the temperature in the 'Bed Temperature' menu on the top right of your screen.".Localize(),
ErrorLevel = ValidationErrorLevel.Warning,
});
}
if (printer.Connection.IsConnected
&& !PrinterSetupRequired(printer)

View file

@ -547,6 +547,9 @@ Translated:Bed Surface Temperatures
English:Bed Temperature
Translated:Bed Temperature
English:Bed Temperature Set to 0
Translated:Bed Temperature Set to 0
English:Bed Temperature:
Translated:Bed Temperature:
@ -5329,6 +5332,9 @@ Translated:The target temperature the extruder will attempt to reach during the
English:The temperature at which the extruder will wipe the nozzle, as specified by Custom G-Code.
Translated:The temperature at which the extruder will wipe the nozzle, as specified by Custom G-Code.
English:The temperature for the 'Bed Surface' you have selected is set to 0. You may get poor bed adhesion or printing results. You can change the temperature in the 'Bed Temperature' menu on the top right of your screen.
Translated:The temperature for the 'Bed Surface' you have selected is set to 0. You may get poor bed adhesion or printing results. You can change the temperature in the 'Bed Temperature' menu on the top right of your screen.
English:The temperature to print when the bed is coverd in kapton tape. Set to 0 to disable or 'NC' if Not Compatible.
Translated:The temperature to print when the bed is coverd in kapton tape. Set to 0 to disable or 'NC' if Not Compatible.