no timeouts when communicating with mmu (temporarily ?)
This commit is contained in:
parent
eac963e3a0
commit
18419eefc4
3 changed files with 8 additions and 10 deletions
|
@ -466,7 +466,7 @@ void gcode_M701();
|
||||||
|
|
||||||
void proc_commands();
|
void proc_commands();
|
||||||
|
|
||||||
bool mmu_get_reponse();
|
bool mmu_get_reponse(bool timeout);
|
||||||
void mmu_not_responding();
|
void mmu_not_responding();
|
||||||
void mmu_load_to_nozzle();
|
void mmu_load_to_nozzle();
|
||||||
void M600_load_filament(bool fsensor_enabled);
|
void M600_load_filament(bool fsensor_enabled);
|
||||||
|
|
|
@ -3380,8 +3380,6 @@ void process_commands()
|
||||||
}
|
}
|
||||||
else if (code_seen("MMURES")) {
|
else if (code_seen("MMURES")) {
|
||||||
fprintf_P(uart2io, PSTR("X0"));
|
fprintf_P(uart2io, PSTR("X0"));
|
||||||
bool response = mmu_get_reponse();
|
|
||||||
if (!response) mmu_not_responding();
|
|
||||||
}
|
}
|
||||||
else if (code_seen("RESET")) {
|
else if (code_seen("RESET")) {
|
||||||
// careful!
|
// careful!
|
||||||
|
@ -6512,7 +6510,7 @@ Sigma_Exit:
|
||||||
fprintf_P(uart2io, PSTR("U0\n"));
|
fprintf_P(uart2io, PSTR("U0\n"));
|
||||||
|
|
||||||
// get response
|
// get response
|
||||||
bool response = mmu_get_reponse();
|
bool response = mmu_get_reponse(false);
|
||||||
if (!response) mmu_not_responding();
|
if (!response) mmu_not_responding();
|
||||||
#else
|
#else
|
||||||
lcd_display_message_fullscreen_P(_T(MSG_PULL_OUT_FILAMENT));
|
lcd_display_message_fullscreen_P(_T(MSG_PULL_OUT_FILAMENT));
|
||||||
|
@ -7032,7 +7030,7 @@ Sigma_Exit:
|
||||||
printf_P(PSTR("T code: %d \n"), tmp_extruder);
|
printf_P(PSTR("T code: %d \n"), tmp_extruder);
|
||||||
fprintf_P(uart2io, PSTR("T%d\n"), tmp_extruder);
|
fprintf_P(uart2io, PSTR("T%d\n"), tmp_extruder);
|
||||||
|
|
||||||
bool response = mmu_get_reponse();
|
bool response = mmu_get_reponse(false);
|
||||||
if (!response) mmu_not_responding();
|
if (!response) mmu_not_responding();
|
||||||
|
|
||||||
snmm_extruder = tmp_extruder; //filament change is finished
|
snmm_extruder = tmp_extruder; //filament change is finished
|
||||||
|
@ -9033,7 +9031,7 @@ static void print_time_remaining_init() {
|
||||||
print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
|
print_percent_done_silent = PRINT_PERCENT_DONE_INIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mmu_get_reponse() {
|
bool mmu_get_reponse(bool timeout) {
|
||||||
bool response = true;
|
bool response = true;
|
||||||
LongTimer mmu_get_reponse_timeout;
|
LongTimer mmu_get_reponse_timeout;
|
||||||
uart2_rx_clr();
|
uart2_rx_clr();
|
||||||
|
@ -9042,7 +9040,7 @@ bool mmu_get_reponse() {
|
||||||
while (!uart2_rx_ok())
|
while (!uart2_rx_ok())
|
||||||
{
|
{
|
||||||
delay_keep_alive(100);
|
delay_keep_alive(100);
|
||||||
if (mmu_get_reponse_timeout.expired(180 * 1000ul)) { //3 minutes timeout
|
if (timeout && mmu_get_reponse_timeout.expired(180 * 1000ul)) { //3 minutes timeout
|
||||||
response = false;
|
response = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -9105,7 +9103,7 @@ void mmu_M600_load_filament() {
|
||||||
snmm_filaments_used |= (1 << tmp_extruder); //for stop print
|
snmm_filaments_used |= (1 << tmp_extruder); //for stop print
|
||||||
printf_P(PSTR("T code: %d \n"), tmp_extruder);
|
printf_P(PSTR("T code: %d \n"), tmp_extruder);
|
||||||
fprintf_P(uart2io, PSTR("T%d\n"), tmp_extruder);
|
fprintf_P(uart2io, PSTR("T%d\n"), tmp_extruder);
|
||||||
response = mmu_get_reponse();
|
response = mmu_get_reponse(false);
|
||||||
if (!response) mmu_not_responding();
|
if (!response) mmu_not_responding();
|
||||||
|
|
||||||
snmm_extruder = tmp_extruder; //filament change is finished
|
snmm_extruder = tmp_extruder; //filament change is finished
|
||||||
|
|
|
@ -5239,7 +5239,7 @@ void extr_adj(int extruder) //loading filament for SNMM
|
||||||
lcd_print(snmm_extruder + 1);
|
lcd_print(snmm_extruder + 1);
|
||||||
|
|
||||||
// get response
|
// get response
|
||||||
bool response = mmu_get_reponse();
|
bool response = mmu_get_reponse(false);
|
||||||
if (!response) mmu_not_responding();
|
if (!response) mmu_not_responding();
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
|
|
||||||
|
@ -5312,7 +5312,7 @@ void extr_unload() { //unloads filament
|
||||||
fprintf_P(uart2io, PSTR("U0\n"));
|
fprintf_P(uart2io, PSTR("U0\n"));
|
||||||
|
|
||||||
// get response
|
// get response
|
||||||
bool response = mmu_get_reponse();
|
bool response = mmu_get_reponse(false);
|
||||||
if (!response) mmu_not_responding();
|
if (!response) mmu_not_responding();
|
||||||
|
|
||||||
lcd_update_enable(true);
|
lcd_update_enable(true);
|
||||||
|
|
Loading…
Reference in a new issue