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;