Merge pull request #1113 from PavelSindler/time_remaining_fix
time remaining fix (PFW-554)
This commit is contained in:
commit
00225bafdc
2 changed files with 6 additions and 6 deletions
|
@ -357,13 +357,13 @@ extern bool mmu_print_saved;
|
|||
|
||||
//estimated time to end of the print
|
||||
extern uint8_t print_percent_done_normal;
|
||||
extern uint32_t print_time_remaining_normal;
|
||||
extern uint16_t print_time_remaining_normal;
|
||||
extern uint8_t print_percent_done_silent;
|
||||
extern uint32_t print_time_remaining_silent;
|
||||
extern uint16_t print_time_remaining_silent;
|
||||
extern uint16_t mcode_in_progress;
|
||||
extern uint16_t gcode_in_progress;
|
||||
|
||||
#define PRINT_TIME_REMAINING_INIT 0xffffffff
|
||||
#define PRINT_TIME_REMAINING_INIT 0xffff
|
||||
#define PRINT_PERCENT_DONE_INIT 0xff
|
||||
#define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved)
|
||||
|
||||
|
|
|
@ -476,9 +476,9 @@ bool mmu_print_saved = false;
|
|||
|
||||
// storing estimated time to end of print counted by slicer
|
||||
uint8_t print_percent_done_normal = PRINT_PERCENT_DONE_INIT;
|
||||
uint32_t print_time_remaining_normal = PRINT_TIME_REMAINING_INIT; //estimated remaining print time in minutes
|
||||
uint16_t print_time_remaining_normal = PRINT_TIME_REMAINING_INIT; //estimated remaining print time in minutes
|
||||
uint8_t print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
|
||||
uint32_t print_time_remaining_silent = PRINT_TIME_REMAINING_INIT; //estimated remaining print time in minutes
|
||||
uint16_t print_time_remaining_silent = PRINT_TIME_REMAINING_INIT; //estimated remaining print time in minutes
|
||||
|
||||
//===========================================================================
|
||||
//=============================Private Variables=============================
|
||||
|
@ -8863,7 +8863,7 @@ uint16_t print_time_remaining() {
|
|||
#else
|
||||
print_t = print_time_remaining_normal;
|
||||
#endif //TMC2130
|
||||
if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100 * print_t / feedmultiply;
|
||||
if ((print_t != PRINT_TIME_REMAINING_INIT) && (feedmultiply != 0)) print_t = 100ul * print_t / feedmultiply;
|
||||
return print_t;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue