diff --git a/SDCard/CMakeLists.txt b/SDCard/CMakeLists.txt index c40b52c4..1abf26f6 100644 --- a/SDCard/CMakeLists.txt +++ b/SDCard/CMakeLists.txt @@ -1,9 +1,12 @@ cmake_minimum_required(VERSION 3.10) #project (MK404_Tests VERSION 1.0) +file(GLOB PRINTER_CLASSES ${PROJECT_SOURCE_DIR}/parts/printers/*.h) + file(GLOB GCODE_FILES *.gcode) -foreach(PRINTER IN LISTS PRINTERS) +foreach(PRINTER_FN IN LISTS PRINTER_CLASSES) + get_filename_component(PRINTER ${PRINTER_FN} NAME_WE) add_custom_target(${PRINTER}_SDcard.bin WORKING_DIRECTORY ${PROJECT_BINARY_DIR} DEPENDS MK404 diff --git a/parts/components/Heater.h b/parts/components/Heater.h index 13ebb4ba..3fb46f2d 100644 --- a/parts/components/Heater.h +++ b/parts/components/Heater.h @@ -61,6 +61,9 @@ class Heater : public BasePeripheral, public Scriptable // Draws the heater status void Draw(); + // Change SoftPWM mode after creation + inline void SetSoftPWM(bool bVal) { m_bIsBed = bVal; } + protected: Scriptable::LineStatus ProcessAction (unsigned int iAct, const std::vector &vArgs) override; diff --git a/parts/printers/Prusa_MK25_13.cpp b/parts/printers/Prusa_MK25_13.cpp index ff46d571..16c29bb4 100644 --- a/parts/printers/Prusa_MK25_13.cpp +++ b/parts/printers/Prusa_MK25_13.cpp @@ -22,6 +22,7 @@ #include "3rdParty/MK3/thermistortables.h" // for temptable_1, OVERSAMPLENR #include "A4982.h" // for A4982 #include "Fan.h" // for Fan +#include "Heater.h" #include "LED.h" // for LED #include "PAT9125.h" // for PAT9125, A4982::IRQ::POSI... #include "PINDA.h" // for PINDA, PINDA::XYCalMap @@ -44,6 +45,8 @@ void Prusa_MK25_13::SetupHardware() pinda.Reconfigure(23.f, 5.f, PINDA::XYCalMap::MK25); + hBed.SetSoftPWM(true); + } void Prusa_MK25_13::SetupFilamentSensor() diff --git a/scripts/tests/snaps/MK2502.png b/scripts/tests/snaps/MK2502.png index 2c542835..16e51c41 100644 Binary files a/scripts/tests/snaps/MK2502.png and b/scripts/tests/snaps/MK2502.png differ diff --git a/scripts/tests/snaps/MK25S02.png b/scripts/tests/snaps/MK25S02.png index 2c542835..16e51c41 100644 Binary files a/scripts/tests/snaps/MK25S02.png and b/scripts/tests/snaps/MK25S02.png differ