Revert changes in Timer class; disable safety timer in handleSafetyTimer function if safetytimer inactive time was set to zero
This commit is contained in:
parent
2a219143fe
commit
2026e7fe4d
|
|
@ -7439,7 +7439,7 @@ static void handleSafetyTimer()
|
||||||
#if (EXTRUDERS > 1)
|
#if (EXTRUDERS > 1)
|
||||||
#error Implemented only for one extruder.
|
#error Implemented only for one extruder.
|
||||||
#endif //(EXTRUDERS > 1)
|
#endif //(EXTRUDERS > 1)
|
||||||
if ((PRINTER_ACTIVE) || (!degTargetBed() && !degTargetHotend(0)))
|
if ((PRINTER_ACTIVE) || (!degTargetBed() && !degTargetHotend(0)) || (!safetytimer_inactive_time))
|
||||||
{
|
{
|
||||||
safetyTimer.stop();
|
safetyTimer.stop();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ void Timer<T>::start()
|
||||||
template<typename T>
|
template<typename T>
|
||||||
bool Timer<T>::expired(T msPeriod)
|
bool Timer<T>::expired(T msPeriod)
|
||||||
{
|
{
|
||||||
if ((!m_isRunning) || (!msPeriod)) return false;
|
if (!m_isRunning) return false;
|
||||||
bool expired = false;
|
bool expired = false;
|
||||||
const T now = millis();
|
const T now = millis();
|
||||||
if (m_started <= m_started + msPeriod)
|
if (m_started <= m_started + msPeriod)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue