return statement not used (fixes Pronterface issues)

This commit is contained in:
PavelSindler 2019-03-21 18:46:07 +01:00
parent 2f3c5e15ed
commit 175f840d16
1 changed files with 23 additions and 17 deletions

View File

@ -6991,15 +6991,18 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
if (mmu_enabled) if (mmu_enabled)
{ {
tmp_extruder = choose_menu_P(_T(MSG_CHOOSE_FILAMENT), _T(MSG_FILAMENT)); tmp_extruder = choose_menu_P(_T(MSG_CHOOSE_FILAMENT), _T(MSG_FILAMENT));
if ((tmp_extruder == mmu_extruder) && mmu_fil_loaded) { if ((tmp_extruder == mmu_extruder) && mmu_fil_loaded) //dont execute the same T-code twice in a row
printf_P(PSTR("Duplicit T-code ignored.\n")); {
return; //dont execute the same T-code twice in a row printf_P(PSTR("Duplicate T-code ignored.\n"));
} }
else
{
st_synchronize(); st_synchronize();
mmu_command(MmuCmd::T0 + tmp_extruder); mmu_command(MmuCmd::T0 + tmp_extruder);
manage_response(true, true, MMU_TCODE_MOVE); manage_response(true, true, MMU_TCODE_MOVE);
} }
} }
}
else if (*(strchr_pointer + index) == 'c') { //load to from bondtech gears to nozzle (nozzle should be preheated) else if (*(strchr_pointer + index) == 'c') { //load to from bondtech gears to nozzle (nozzle should be preheated)
if (mmu_enabled) if (mmu_enabled)
{ {
@ -7033,10 +7036,12 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
if (mmu_enabled) if (mmu_enabled)
{ {
if ((tmp_extruder == mmu_extruder) && mmu_fil_loaded) { if ((tmp_extruder == mmu_extruder) && mmu_fil_loaded) //dont execute the same T-code twice in a row
printf_P(PSTR("Duplicit T-code ignored.\n")); {
return; //dont execute the same T-code twice in a row printf_P(PSTR("Duplicate T-code ignored.\n"));
} }
else
{
mmu_command(MmuCmd::T0 + tmp_extruder); mmu_command(MmuCmd::T0 + tmp_extruder);
manage_response(true, true, MMU_TCODE_MOVE); manage_response(true, true, MMU_TCODE_MOVE);
@ -7048,6 +7053,7 @@ if((eSoundMode==e_SOUND_MODE_LOUD)||(eSoundMode==e_SOUND_MODE_ONCE))
mmu_load_to_nozzle(); mmu_load_to_nozzle();
} }
} }
}
else else
{ {
#ifdef SNMM #ifdef SNMM