From 0929a35a4f0542b18def68a95632efda56be5955 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Sat, 25 Aug 2018 17:21:17 +0200 Subject: [PATCH] 5 minutes mmu timeout --- Firmware/mmu.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 94a19b9f..05bf8704 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -19,6 +19,7 @@ extern char choose_extruder_menu(); #define MMU_TODELAY 100 #define MMU_TIMEOUT 10 +#define MMU_CMD_TIMEOUT 300000ul //milliseconds (5min timeout) #define MMU_HWRESET #define MMU_RST_PIN 76 @@ -187,7 +188,7 @@ void mmu_loop(void) if (mmu_cmd == 0) mmu_ready = true; } - else if ((mmu_last_request + 30000) < millis()) + else if ((mmu_last_request + MMU_CMD_TIMEOUT) < millis()) { //resend request after timeout (30s) mmu_state = 1; } @@ -199,7 +200,7 @@ void mmu_loop(void) mmu_ready = true; mmu_state = 1; } - else if ((mmu_last_request + 30000) < millis()) + else if ((mmu_last_request + MMU_CMD_TIMEOUT) < millis()) { //resend request after timeout (30s) mmu_state = 1; }