Add parameter `D` to gcode `M73` for silent/stealth mode
This commit is contained in:
parent
83e791cbbe
commit
d063ffb141
|
|
@ -366,7 +366,8 @@ extern uint8_t print_percent_done_normal;
|
||||||
extern uint16_t print_time_remaining_normal;
|
extern uint16_t print_time_remaining_normal;
|
||||||
extern uint8_t print_percent_done_silent;
|
extern uint8_t print_percent_done_silent;
|
||||||
extern uint16_t print_time_remaining_silent;
|
extern uint16_t print_time_remaining_silent;
|
||||||
extern uint16_t print_time_to_change;
|
extern uint16_t print_time_to_change_normal;
|
||||||
|
extern uint16_t print_time_to_change_silent;
|
||||||
|
|
||||||
#define PRINT_TIME_REMAINING_INIT 0xffff
|
#define PRINT_TIME_REMAINING_INIT 0xffff
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -316,7 +316,8 @@ uint8_t print_percent_done_normal = PRINT_PERCENT_DONE_INIT;
|
||||||
uint16_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;
|
uint8_t print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
|
||||||
uint16_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
|
||||||
uint16_t print_time_to_change = PRINT_TIME_REMAINING_INIT; //estimated remaining time to next change in minutes
|
uint16_t print_time_to_change_normal = PRINT_TIME_REMAINING_INIT; //estimated remaining time to next change in minutes
|
||||||
|
uint16_t print_time_to_change_silent = PRINT_TIME_REMAINING_INIT; //estimated remaining time to next change in minutes
|
||||||
|
|
||||||
uint32_t IP_address = 0;
|
uint32_t IP_address = 0;
|
||||||
|
|
||||||
|
|
@ -6419,11 +6420,13 @@ Sigma_Exit:
|
||||||
printf_P(_msg_mode_done_remain, _N("SILENT"), int(print_percent_done_silent), print_time_remaining_silent);
|
printf_P(_msg_mode_done_remain, _N("SILENT"), int(print_percent_done_silent), print_time_remaining_silent);
|
||||||
}
|
}
|
||||||
|
|
||||||
print_time_to_change = PRINT_TIME_REMAINING_INIT;
|
if(code_seen('C')) print_time_to_change_normal = code_value();
|
||||||
if(code_seen('C'))
|
if(code_seen('D')) print_time_to_change_silent = code_value();
|
||||||
|
|
||||||
{
|
{
|
||||||
print_time_to_change = code_value();
|
const char* _msg_mode_done_remain = _N("%S MODE: Change in mins: %d\n");
|
||||||
printf_P(_N("Change in mins: %d\n"), print_time_to_change);
|
printf_P(_msg_mode_done_remain, _N("NORMAL"), print_time_to_change_normal);
|
||||||
|
printf_P(_msg_mode_done_remain, _N("SILENT"), print_time_to_change_silent);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -11696,7 +11699,8 @@ static void print_time_remaining_init()
|
||||||
print_percent_done_normal = PRINT_PERCENT_DONE_INIT;
|
print_percent_done_normal = PRINT_PERCENT_DONE_INIT;
|
||||||
print_time_remaining_silent = PRINT_TIME_REMAINING_INIT;
|
print_time_remaining_silent = PRINT_TIME_REMAINING_INIT;
|
||||||
print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
|
print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
|
||||||
print_time_to_change = PRINT_TIME_REMAINING_INIT;
|
print_time_to_change_normal = PRINT_TIME_REMAINING_INIT;
|
||||||
|
print_time_to_change_silent = PRINT_TIME_REMAINING_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_filament_final_feed()
|
void load_filament_final_feed()
|
||||||
|
|
|
||||||
|
|
@ -676,25 +676,47 @@ void lcdui_print_time(void)
|
||||||
if ((PRINTER_ACTIVE) && (starttime != 0))
|
if ((PRINTER_ACTIVE) && (starttime != 0))
|
||||||
{
|
{
|
||||||
uint16_t print_t = 0;
|
uint16_t print_t = 0;
|
||||||
|
uint16_t print_tr = 0;
|
||||||
|
uint16_t print_tc = 0;
|
||||||
char suff = ' ';
|
char suff = ' ';
|
||||||
char suff_doubt = ' ';
|
char suff_doubt = ' ';
|
||||||
|
|
||||||
if (print_time_to_change != PRINT_TIME_REMAINING_INIT)
|
#ifdef TMC2130
|
||||||
|
if (SilentModeMenu != SILENT_MODE_OFF)
|
||||||
{
|
{
|
||||||
print_t = print_time_to_change;
|
if (print_time_remaining_silent != PRINT_TIME_REMAINING_INIT)
|
||||||
|
{
|
||||||
|
print_tr = print_time_remaining_silent;
|
||||||
|
}
|
||||||
|
if (print_time_to_change_silent != PRINT_TIME_REMAINING_INIT)
|
||||||
|
{
|
||||||
|
print_tc = print_time_to_change_silent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#endif //TMC2130
|
||||||
|
if (print_time_remaining_normal != PRINT_TIME_REMAINING_INIT)
|
||||||
|
{
|
||||||
|
print_tr = print_time_remaining_normal;
|
||||||
|
}
|
||||||
|
if (print_time_to_change_normal != PRINT_TIME_REMAINING_INIT)
|
||||||
|
{
|
||||||
|
print_tc = print_time_to_change_normal;
|
||||||
|
}
|
||||||
|
#ifdef TMC2130
|
||||||
|
}
|
||||||
|
#endif //TMC2130
|
||||||
|
|
||||||
|
if (print_tc != 0)
|
||||||
|
{
|
||||||
|
print_t = print_tc;
|
||||||
suff = 'C';
|
suff = 'C';
|
||||||
}
|
}
|
||||||
else
|
else if (print_tr != 0)
|
||||||
{
|
{
|
||||||
|
print_t = print_tr;
|
||||||
suff = 'R';
|
suff = 'R';
|
||||||
#ifdef TMC2130
|
|
||||||
if (print_time_remaining_silent != PRINT_TIME_REMAINING_INIT && (SilentModeMenu != SILENT_MODE_OFF))
|
|
||||||
{
|
|
||||||
print_t = print_time_remaining_silent;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif //TMC2130
|
|
||||||
print_t = print_time_remaining_normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (feedmultiply != 100)
|
if (feedmultiply != 100)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue