From 43ae2c78e509cbf39eb00abafa7eb0d1e3d3abc2 Mon Sep 17 00:00:00 2001 From: "D.R.racer" Date: Wed, 25 Jan 2023 10:35:39 +0100 Subject: [PATCH] Fix cmake build --- CMakeLists.txt | 1 + Firmware/mmu2.cpp | 2 +- Firmware/mmu2_log.h | 6 +++--- Firmware/mmu2_marlin.h | 2 +- Firmware/mmu2_marlin1.cpp | 10 +++++----- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b6d3b4e08..5f4854434 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,6 +151,7 @@ set(FW_SOURCES mmu2_error_converter.cpp mmu2_fsensor.cpp mmu2_log.cpp + mmu2_marlin1.cpp mmu2_power.cpp mmu2_progress_converter.cpp mmu2_protocol.cpp diff --git a/Firmware/mmu2.cpp b/Firmware/mmu2.cpp index b0e65fa90..9bd7fc777 100644 --- a/Firmware/mmu2.cpp +++ b/Firmware/mmu2.cpp @@ -577,7 +577,7 @@ void MMU2::SaveAndPark(bool move_axes) { resume_position = planner_current_position(); // save current pos // lift Z - raise_z(MMU_ERR_Z_PAUSE_LIFT); + MoveRaiseZ(MMU_ERR_Z_PAUSE_LIFT); // move XY aside if (all_axes_homed()) { diff --git a/Firmware/mmu2_log.h b/Firmware/mmu2_log.h index 249b7d2e6..45ed5d7da 100644 --- a/Firmware/mmu2_log.h +++ b/Firmware/mmu2_log.h @@ -25,21 +25,21 @@ void LogEchoEvent_P(const char *msg); #define MMU2_ECHO_MSGLN(S) \ do { \ - SERIAL_ECHO_START(); \ + SERIAL_ECHO_START; \ SERIAL_MMU2(); \ SERIAL_ECHOLN(S); \ } while (0) #define MMU2_ERROR_MSGLN(S) MMU2_ECHO_MSGLN(S) //!@todo Decide MMU2 errors on serial line #define MMU2_ECHO_MSGRPGM(S) \ do { \ - SERIAL_ECHO_START(); \ + SERIAL_ECHO_START; \ SERIAL_MMU2(); \ SERIAL_ECHO(S); \ } while (0) #define MMU2_ERROR_MSGRPGM(S) MMU2_ECHO_MSGRPGM(S) //!@todo Decide MMU2 errors on serial line #define MMU2_ECHO_MSG(S) \ do { \ - SERIAL_ECHO_START(); \ + SERIAL_ECHO_START; \ SERIAL_MMU2(); \ SERIAL_ECHO(S); \ } while (0) diff --git a/Firmware/mmu2_marlin.h b/Firmware/mmu2_marlin.h index 1e70b73d1..ba3982656 100644 --- a/Firmware/mmu2_marlin.h +++ b/Firmware/mmu2_marlin.h @@ -24,7 +24,7 @@ struct pos3d { void MoveE(float delta, float feedRate); -float raise_z(float delta); +float MoveRaiseZ(float delta); void planner_synchronize(); bool planner_any_moves(); diff --git a/Firmware/mmu2_marlin1.cpp b/Firmware/mmu2_marlin1.cpp index 803ca8c50..f31b74464 100644 --- a/Firmware/mmu2_marlin1.cpp +++ b/Firmware/mmu2_marlin1.cpp @@ -1,5 +1,6 @@ /// @file /// MK3 / Marlin1 implementation of support routines for the MMU2 +#include "mmu2_marlin.h" #include "Marlin.h" #include "stepper.h" #include "planner.h" @@ -13,9 +14,8 @@ void MoveE(float delta, float feedRate) { plan_buffer_line_curposXYZE(feedRate); } -float raise_z(float delta) { - // @@TODO - return 0.0F; +float MoveRaiseZ(float delta) { + return raise_z(delta); } void planner_synchronize() { @@ -27,7 +27,7 @@ bool planner_any_moves() { } float planner_get_machine_position_E_mm(){ -// @@TODO return Planner::get_machine_position_mm()[3]; + return current_position[E_AXIS]; } float planner_get_current_position_E(){ @@ -82,7 +82,7 @@ void marlin_manage_inactivity(bool b){ void marlin_idle(bool b){ manage_heater(); - manage_inactivity(true); + manage_inactivity(b); } int16_t thermal_degTargetHotend() {