From 8d9dc73d1b8c06a7c7c4f308203227c6ee112bd1 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Wed, 12 Aug 2020 17:25:49 +0300 Subject: [PATCH] Fix compile error fix compile Fix compile error --- Firmware/Dcodes.cpp | 2 +- Firmware/Marlin.h | 2 +- Firmware/Marlin_main.cpp | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Firmware/Dcodes.cpp b/Firmware/Dcodes.cpp index 85d78001..c77cd96e 100644 --- a/Firmware/Dcodes.cpp +++ b/Firmware/Dcodes.cpp @@ -1,5 +1,5 @@ #include "Dcodes.h" -//#include "Marlin.h" +#include "Marlin.h" #include "Configuration.h" #include "language.h" #include "cmdqueue.h" diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 2585d0c8..3a4b4259 100755 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -512,6 +512,6 @@ void load_filament_final_feed(); void marlin_wait_for_click(); void raise_z_above(float target, bool plan=true); -void softReset(); +extern "C" void softReset(); #endif diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index fa02a956..a83d64b8 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -648,6 +648,12 @@ void failstats_reset_print() #endif } +void softReset() +{ + cli(); + wdt_enable(WDTO_15MS); + while(1); +} #ifdef MESH_BED_LEVELING @@ -11715,13 +11721,6 @@ void disable_force_z() #endif // TMC2130 } -void softReset() -{ - cli(); - wdt_enable(WDTO_15MS); - while(1); -} - void enable_force_z() { if(bEnableForce_z)