From 9bec1e027429ef90deb3046091ab5f3e43301435 Mon Sep 17 00:00:00 2001 From: LarsBrubaker Date: Sat, 26 Mar 2022 18:50:58 -0700 Subject: [PATCH] Added an error for bed temp set when bed surface is set --- .../Settings/ValidationError.cs | 1 + .../ApplicationView/SettingsValidation.cs | 17 +++++++++++++++++ StaticData/Translations/Master.txt | 6 ++++++ 3 files changed, 24 insertions(+) diff --git a/MatterControl.Printing/Settings/ValidationError.cs b/MatterControl.Printing/Settings/ValidationError.cs index 71d980424..d5c303be4 100644 --- a/MatterControl.Printing/Settings/ValidationError.cs +++ b/MatterControl.Printing/Settings/ValidationError.cs @@ -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); diff --git a/MatterControlLib/ApplicationView/SettingsValidation.cs b/MatterControlLib/ApplicationView/SettingsValidation.cs index 6932de9d5..1ff5277c3 100644 --- a/MatterControlLib/ApplicationView/SettingsValidation.cs +++ b/MatterControlLib/ApplicationView/SettingsValidation.cs @@ -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(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) diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index 9e327dd7e..ee910dcce 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -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.