Skip to content

Commit

Permalink
Fix bed heaters on MK2.5 and SD target names (#254)
Browse files Browse the repository at this point in the history
* SD card targets based on printer code files (#249)

* Fix self-immolating bed on 2.5 series (#252)
  • Loading branch information
vintagepc authored Oct 1, 2020
1 parent 9d81399 commit 4ec56dd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SDCard/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions parts/components/Heater.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> &vArgs) override;

Expand Down
3 changes: 3 additions & 0 deletions parts/printers/Prusa_MK25_13.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
Binary file modified scripts/tests/snaps/MK2502.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified scripts/tests/snaps/MK25S02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4ec56dd

Please sign in to comment.