diff --git a/Firmware/Marlin.h b/Firmware/Marlin.h index 4333c977..7187ac93 100644 --- a/Firmware/Marlin.h +++ b/Firmware/Marlin.h @@ -359,9 +359,9 @@ extern bool mmu_print_saved; //estimated time to end of the print extern uint8_t print_percent_done_normal; -extern uint16_t print_time_remaining_normal; +extern uint32_t print_time_remaining_normal; extern uint8_t print_percent_done_silent; -extern uint16_t print_time_remaining_silent; +extern uint32_t print_time_remaining_silent; #define PRINT_TIME_REMAINING_INIT 0xffffffff #define PRINT_PERCENT_DONE_INIT 0xff #define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == 4) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 72d01de5..af2942d1 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -336,8 +336,8 @@ float pause_lastpos[4]; unsigned long pause_time = 0; unsigned long start_pause_print = millis(); unsigned long t_fan_rising_edge = millis(); -static LongTimer safetyTimer; -static LongTimer crashDetTimer; +LongTimer safetyTimer; +LongTimer crashDetTimer; //unsigned long load_filament_time; diff --git a/Firmware/lcd.cpp b/Firmware/lcd.cpp index f8e4b4c6..62060d11 100644 --- a/Firmware/lcd.cpp +++ b/Firmware/lcd.cpp @@ -755,6 +755,7 @@ void lcd_update_enable(uint8_t enabled) } } +extern LongTimer safetyTimer; void lcd_buttons_update(void) { static bool _lock = false; diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index de760d0c..f215a7f4 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -34,6 +34,8 @@ int8_t mmu_finda = -1; int16_t mmu_version = -1; +int16_t mmu_build = -1; + //clear rx buffer void mmu_clr_rx_buf(void) @@ -74,8 +76,8 @@ int8_t mmu_rx_start(void) //initialize mmu_unit bool mmu_init(void) { - digitalWrite(MMU_RST_PIN, HIGH); - pinMode(MMU_RST_PIN, OUTPUT); //setup reset pin + digitalWrite(MMU_RST_PIN, HIGH); + pinMode(MMU_RST_PIN, OUTPUT); //setup reset pin uart2_init(); //init uart2 _delay_ms(10); //wait 10ms for sure if (mmu_reset()) //reset mmu @@ -90,8 +92,8 @@ bool mmu_init(void) bool mmu_reset(void) { #ifdef MMU_HWRESET - digitalWrite(MMU_RST_PIN, LOW); - _delay_us(100); + digitalWrite(MMU_RST_PIN, LOW); + _delay_us(100); digitalWrite(MMU_RST_PIN, HIGH); #else mmu_puts_P(PSTR("X0\n")); //send command @@ -100,6 +102,7 @@ bool mmu_reset(void) while ((mmu_rx_start() <= 0) && (--timeout)) delay_keep_alive(MMU_TODELAY); mmu_enabled = timeout?true:false; + mmu_enabled = true; return mmu_enabled; }