From 3473b21710e236669017ddab2650f566499dde64 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 1 Mar 2020 09:50:53 -0600 Subject: [PATCH] Move millis_t includes --- Marlin/src/HAL/HAL_LPC1768/main.cpp | 1 + Marlin/src/HAL/HAL_STM32/Servo.h | 2 ++ Marlin/src/HAL/shared/Delay.h | 1 - Marlin/src/core/types.h | 2 +- Marlin/src/core/utility.h | 1 + Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp | 2 +- 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Marlin/src/HAL/HAL_LPC1768/main.cpp b/Marlin/src/HAL/HAL_LPC1768/main.cpp index d7ba62fe5e..149153e8a7 100644 --- a/Marlin/src/HAL/HAL_LPC1768/main.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/main.cpp @@ -37,6 +37,7 @@ extern "C" { #include "../../sd/cardreader.h" #include "../../inc/MarlinConfig.h" +#include "../../core/millis_t.h" #include "HAL.h" #include "timers.h" diff --git a/Marlin/src/HAL/HAL_STM32/Servo.h b/Marlin/src/HAL/HAL_STM32/Servo.h index 1f841f8184..e8b3c4b100 100644 --- a/Marlin/src/HAL/HAL_STM32/Servo.h +++ b/Marlin/src/HAL/HAL_STM32/Servo.h @@ -24,6 +24,8 @@ #include +#include "../../core/millis_t.h" + // Inherit and expand on the official library class libServo : public Servo { public: diff --git a/Marlin/src/HAL/shared/Delay.h b/Marlin/src/HAL/shared/Delay.h index 78bf6745ea..5cb68b1503 100644 --- a/Marlin/src/HAL/shared/Delay.h +++ b/Marlin/src/HAL/shared/Delay.h @@ -29,7 +29,6 @@ * DELAY_US(count): Delay execution in microseconds */ -#include "../../core/millis_t.h" #include "../../core/macros.h" #if defined(__arm__) || defined(__thumb__) diff --git a/Marlin/src/core/types.h b/Marlin/src/core/types.h index d563963cf7..17301bd8c1 100644 --- a/Marlin/src/core/types.h +++ b/Marlin/src/core/types.h @@ -24,7 +24,7 @@ #include #include -#include "millis_t.h" +#include "../inc/MarlinConfigPre.h" class __FlashStringHelper; typedef const __FlashStringHelper *progmem_str; diff --git a/Marlin/src/core/utility.h b/Marlin/src/core/utility.h index e34f9dd58a..c2da029196 100644 --- a/Marlin/src/core/utility.h +++ b/Marlin/src/core/utility.h @@ -23,6 +23,7 @@ #include "../inc/MarlinConfigPre.h" #include "../core/types.h" +#include "../core/millis_t.h" // Delay that ensures heaters and watchdog are kept alive void safe_delay(millis_t ms); diff --git a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp index 0e6374b8d2..d79a7ccf61 100644 --- a/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp +++ b/Marlin/src/lcd/HD44780/ultralcd_HD44780.cpp @@ -829,7 +829,7 @@ void MarlinUI::draw_status_screen() { && !printingIsActive() #endif ) { - xy_pos_t lpos = current_position; toLogical(lpos); + const xy_pos_t lpos = current_position.asLogical(); _draw_axis_value(X_AXIS, ftostr4sign(lpos.x), blink); lcd_put_wchar(' '); _draw_axis_value(Y_AXIS, ftostr4sign(lpos.y), blink);