Ver Fonte

Revert changes in Timer class; disable safety timer in handleSafetyTimer function if safetytimer inactive time was set to zero

PavelSindler há 6 anos atrás
pai
commit
2026e7fe4d
2 ficheiros alterados com 2 adições e 2 exclusões
  1. 1 1
      Firmware/Marlin_main.cpp
  2. 1 1
      Firmware/Timer.cpp

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -7439,7 +7439,7 @@ static void handleSafetyTimer()
 #if (EXTRUDERS > 1)
 #error Implemented only for one extruder.
 #endif //(EXTRUDERS > 1)
-    if ((PRINTER_ACTIVE) || (!degTargetBed() && !degTargetHotend(0)))
+    if ((PRINTER_ACTIVE) || (!degTargetBed() && !degTargetHotend(0)) || (!safetytimer_inactive_time))
     {
         safetyTimer.stop();
     }

+ 1 - 1
Firmware/Timer.cpp

@@ -43,7 +43,7 @@ void Timer<T>::start()
 template<typename T>
 bool Timer<T>::expired(T msPeriod)
 {
-    if ((!m_isRunning) || (!msPeriod)) return false;
+    if (!m_isRunning) return false;
     bool expired = false;
     const T now = millis();
     if (m_started <=  m_started + msPeriod)