From f3b5689c2ae43a4d3d62f51c2902b266712ba405 Mon Sep 17 00:00:00 2001 From: JonatanRek Date: Mon, 30 Dec 2024 12:18:21 +0100 Subject: [PATCH] Tweaks --- marlin2.cpp | 1 + marlin2.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/marlin2.cpp b/marlin2.cpp index 56a14c5..04a10d0 100644 --- a/marlin2.cpp +++ b/marlin2.cpp @@ -113,6 +113,7 @@ namespace esphome { } } if(print_progress == 0.0 && (bed_set_temperature!=0.0 || ext_set_temperature!=0.0)) { + //print_time_offset = print_time save print time ofset to deduct from total value send to hass set_printer_state("PREHEATING"); } #endif diff --git a/marlin2.h b/marlin2.h index e645895..7cdc71a 100644 --- a/marlin2.h +++ b/marlin2.h @@ -35,6 +35,8 @@ class Marlin2 : public PollingComponent, public uart::UARTDevice { std::string PrinterState; float print_progress = 0; + double print_time_offset = 0; + #ifdef USE_SENSOR std::vector> sensors;