From 1e729048dc9ebb921c1f1b6970ac622a17af6fbd Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 21 Feb 2019 00:14:49 +0100 Subject: [PATCH 1/6] cmdqueue_reset fix --- Firmware/cmdqueue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/cmdqueue.cpp b/Firmware/cmdqueue.cpp index f1cd48f8..2f892c9c 100644 --- a/Firmware/cmdqueue.cpp +++ b/Firmware/cmdqueue.cpp @@ -94,7 +94,7 @@ void cmdqueue_reset() bufindr = 0; bufindw = 0; buflen = 0; - cmdbuffer_front_already_processed = false; + cmdbuffer_front_already_processed = true; } // How long a string could be pushed to the front of the command queue? From a54c68b874f7ccb5c21e177879ad21afb6e59bff Mon Sep 17 00:00:00 2001 From: MRprusa3d Date: Thu, 21 Feb 2019 04:45:44 +0100 Subject: [PATCH 2/6] preHeat @ filament management another funcionality II --- Firmware/menu.cpp | 19 +--------- Firmware/mmu.cpp | 60 +++++++++++++++++++++++++------- Firmware/mmu.h | 2 ++ Firmware/ultralcd.cpp | 81 ++++++++++++++++++++++++++++++++----------- 4 files changed, 111 insertions(+), 51 deletions(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index f6bc6055..a3fb4d18 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -16,7 +16,7 @@ extern int32_t lcd_encoder; -#define MENU_DEPTH_MAX 4 +#define MENU_DEPTH_MAX 6 static menu_record_t menu_stack[MENU_DEPTH_MAX]; @@ -85,7 +85,6 @@ void menu_end(void) } } -//-// void menu_back(uint8_t nLevel) { menu_depth = ((menu_depth > nLevel) ? (menu_depth - nLevel) : 0); @@ -97,17 +96,6 @@ void menu_back(void) menu_back(1); } -/* -void menu_back(void) -{ - if (menu_depth > 0) - { - menu_depth--; - menu_goto(menu_stack[menu_depth].menu, menu_stack[menu_depth].position, true, true); - } -} -*/ - static void menu_back_no_reset(void) { if (menu_depth > 0) @@ -394,8 +382,3 @@ template uint8_t menu_item_edit_P(const char* str, int16_t *pval, int1 template uint8_t menu_item_edit_P(const char* str, uint8_t *pval, int16_t min_val, int16_t max_val); #undef _menu_data - - - - - diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 5e1e5471..e18b0932 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -1022,6 +1022,28 @@ void mmu_filament_ramming() } } +//-// +void extr_unload_() +{ +//if(bFilamentAction) +if(0) + { + bFilamentAction=false; + extr_unload(); + } +else { + eFilamentAction=e_FILAMENT_ACTION_mmuUnLoad; + bFilamentFirstRun=false; + if(target_temperature[0]>=EXTRUDE_MINTEMP) + { + bFilamentPreheatState=true; + mFilamentItem(target_temperature[0],target_temperature_bed); + } +// else menu_submenu(mFilamentMenu); + else mFilamentMenu(); + } +} + void extr_unload() { //unload just current filament for multimaterial printers #ifdef SNMM @@ -1030,11 +1052,8 @@ void extr_unload() uint8_t SilentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT); #endif -//-// if (degHotend0() > EXTRUDE_MINTEMP) -//if(current_temperature[0]>(target_temperature[0]*0.95)) -if(bFilamentAction) + if (degHotend0() > EXTRUDE_MINTEMP) { -bFilamentAction=false; #ifndef SNMM st_synchronize(); @@ -1108,13 +1127,7 @@ bFilamentAction=false; } else { - eFilamentAction=e_FILAMENT_ACTION_mmuUnLoad; - bFilamentFirstRun=false; - if(target_temperature[0]>=EXTRUDE_MINTEMP) { - bFilamentPreheatState=true; - mFilamentItem(target_temperature[0],target_temperature_bed); - } - else menu_submenu(mFilamentMenu); + show_preheat_nozzle_warning(); } //lcd_return_to_status(); } @@ -1172,51 +1185,71 @@ void extr_adj_4() void mmu_load_to_nozzle_0() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(0); } void mmu_load_to_nozzle_1() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(1); } void mmu_load_to_nozzle_2() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(2); } void mmu_load_to_nozzle_3() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(3); } void mmu_load_to_nozzle_4() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(4); } void mmu_eject_fil_0() { +//-// + menu_back(); mmu_eject_filament(0, true); } void mmu_eject_fil_1() { +//-// + menu_back(); mmu_eject_filament(1, true); } void mmu_eject_fil_2() { +//-// + menu_back(); mmu_eject_filament(2, true); } void mmu_eject_fil_3() { +//-// + menu_back(); mmu_eject_filament(3, true); } void mmu_eject_fil_4() { +//-// + menu_back(); mmu_eject_filament(4, true); } @@ -1344,7 +1377,7 @@ void mmu_show_warning() void lcd_mmu_load_to_nozzle(uint8_t filament_nr) { //-// -bFilamentAction=false; +bFilamentAction=false; // NOT in "mmu_load_to_nozzle_menu()" if (degHotend0() > EXTRUDE_MINTEMP) { tmp_extruder = filament_nr; @@ -1377,7 +1410,8 @@ bFilamentAction=false; void mmu_eject_filament(uint8_t filament, bool recover) { //-// -bFilamentAction=false; +bFilamentAction=false; // NOT in "mmu_fil_eject_menu()" +return; if (filament < 5) { diff --git a/Firmware/mmu.h b/Firmware/mmu.h index 71930ae7..446c9aec 100644 --- a/Firmware/mmu.h +++ b/Firmware/mmu.h @@ -101,6 +101,8 @@ extern int get_ext_nr(); extern void display_loading(); extern void extr_adj(int extruder); extern void extr_unload(); +//-// +extern void extr_unload_(); extern void extr_adj_0(); extern void extr_adj_1(); extern void extr_adj_2(); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 93651434..f6502cef 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2310,6 +2310,8 @@ bool bFilamentAction=false; static void mFilamentPrompt() { +uint8_t nLevel; + lcd_set_cursor(0,0); lcdui_print_temp(LCD_STR_THERMOMETER[0],(int)degHotend(0),(int)degTargetHotend(0)); lcd_set_cursor(0,2); @@ -2332,14 +2334,13 @@ switch(eFilamentAction) } if(lcd_clicked()) { -//./ menu_back(); -//./ menu_back(); -menu_back(2); + nLevel=2; if(!bFilamentPreheatState) { - menu_back(); -//-// setTargetHotend0(0.0); + nLevel++; +// setTargetHotend0(0.0); // uncoment if return to base state is required } + menu_back(nLevel); switch(eFilamentAction) { case e_FILAMENT_ACTION_Load: @@ -2350,20 +2351,27 @@ menu_back(2); case e_FILAMENT_ACTION_unLoad: enquecommand_P(PSTR("M702")); // unload filament break; +/* case e_FILAMENT_ACTION_mmuLoad: - MYSERIAL.println("mFilamentPrompt - mmuLoad"); -bFilamentAction=true; +//./ MYSERIAL.println("mFilamentPrompt - mmuLoad"); + bFilamentAction=true; menu_submenu(mmu_load_to_nozzle_menu); break; +*/ +/* case e_FILAMENT_ACTION_mmuUnLoad: -bFilamentAction=true; +//./ MYSERIAL.println("mFilamentPrompt - mmuUnLoad"); + bFilamentAction=true; extr_unload(); break; +*/ +/* case e_FILAMENT_ACTION_mmuEject: MYSERIAL.println("mFilamentPrompt - mmuEject"); -bFilamentAction=true; - menu_submenu(mmu_fil_eject_menu); + bFilamentAction=true; +// menu_submenu(mmu_fil_eject_menu); break; +*/ } if(eFilamentAction==e_FILAMENT_ACTION_autoLoad) eFilamentAction=e_FILAMENT_ACTION_none; // i.e. non-autoLoad @@ -2373,6 +2381,8 @@ bFilamentAction=true; void mFilamentItem(uint16_t nTemp,uint16_t nTempBed) { static int nTargetOld,nTargetBedOld; +uint8_t nLevel; +static bool bBeep=false; //if(bPreheatState) // not necessary nTargetOld=target_temperature[0]; @@ -2416,12 +2426,47 @@ if(lcd_clicked()) if(eFilamentAction==e_FILAMENT_ACTION_autoLoad) eFilamentAction=e_FILAMENT_ACTION_none; // i.e. non-autoLoad } -//./else if(!isHeatingHotend0()) -else if(current_temperature[0]>(target_temperature[0]*0.95)) +else { + if(current_temperature[0]>(target_temperature[0]*0.95)) { - menu_submenu(mFilamentPrompt); - Sound_MakeSound(e_SOUND_TYPE_StandardPrompt); + switch(eFilamentAction) + { + case e_FILAMENT_ACTION_Load: + case e_FILAMENT_ACTION_autoLoad: + case e_FILAMENT_ACTION_unLoad: + menu_submenu(mFilamentPrompt); + break; + case e_FILAMENT_ACTION_mmuLoad: + nLevel=1; + if(!bFilamentPreheatState) + nLevel++; + bFilamentAction=true; + menu_back(nLevel); + menu_submenu(mmu_load_to_nozzle_menu); + break; + case e_FILAMENT_ACTION_mmuUnLoad: + nLevel=1; + if(!bFilamentPreheatState) + nLevel++; + bFilamentAction=true; + menu_back(nLevel); + extr_unload(); + break; + case e_FILAMENT_ACTION_mmuEject: + nLevel=1; + if(!bFilamentPreheatState) + nLevel++; + bFilamentAction=true; + menu_back(nLevel); + menu_submenu(mmu_fil_eject_menu); + break; + } + if(bBeep) + Sound_MakeSound(e_SOUND_TYPE_StandardPrompt); + bBeep=false; } + else bBeep=true; + } } static void mFilamentItem_PLA() @@ -5643,10 +5688,8 @@ static void fil_load_menu() static void mmu_load_to_nozzle_menu() { //-//if (degHotend0() > EXTRUDE_MINTEMP) -//if(current_temperature[0]>(target_temperature[0]*0.95)) if(bFilamentAction) { -//../bFilamentAction=false; MENU_BEGIN(); MENU_ITEM_BACK_P(_T(MSG_MAIN)); MENU_ITEM_FUNCTION_P(_i("Load filament 1"), mmu_load_to_nozzle_0); @@ -5671,10 +5714,8 @@ else { static void mmu_fil_eject_menu() { //-//if (degHotend0() > EXTRUDE_MINTEMP) -//if(current_temperature[0]>(target_temperature[0]*0.95)) if(bFilamentAction) { -//../bFilamentAction=false; MENU_BEGIN(); MENU_ITEM_BACK_P(_T(MSG_MAIN)); MENU_ITEM_FUNCTION_P(_i("Eject filament 1"), mmu_eject_fil_0); @@ -5685,7 +5726,6 @@ if(bFilamentAction) MENU_END(); } else { - MYSERIAL.println(" eject - else"); eFilamentAction=e_FILAMENT_ACTION_mmuEject; bFilamentFirstRun=false; if(target_temperature[0]>=EXTRUDE_MINTEMP) @@ -6166,7 +6206,8 @@ static void lcd_main_menu() MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), fil_load_menu); MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu); //-// MENU_ITEM_FUNCTION_P(_T(MSG_UNLOAD_FILAMENT), extr_unload); - MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), extr_unload); +//bFilamentFirstRun=true; + MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), extr_unload_); MENU_ITEM_SUBMENU_P(_i("Eject filament"), mmu_fil_eject_menu); } else From 323071f50a787722907494ac6e6b22ed51c46301 Mon Sep 17 00:00:00 2001 From: MRprusa3d Date: Thu, 21 Feb 2019 04:45:44 +0100 Subject: [PATCH 3/6] preHeat @ filament management another funcionality II --- Firmware/menu.cpp | 19 +--------- Firmware/mmu.cpp | 60 +++++++++++++++++++++++++------- Firmware/mmu.h | 2 ++ Firmware/ultralcd.cpp | 81 ++++++++++++++++++++++++++++++++----------- 4 files changed, 111 insertions(+), 51 deletions(-) diff --git a/Firmware/menu.cpp b/Firmware/menu.cpp index f6bc6055..a3fb4d18 100644 --- a/Firmware/menu.cpp +++ b/Firmware/menu.cpp @@ -16,7 +16,7 @@ extern int32_t lcd_encoder; -#define MENU_DEPTH_MAX 4 +#define MENU_DEPTH_MAX 6 static menu_record_t menu_stack[MENU_DEPTH_MAX]; @@ -85,7 +85,6 @@ void menu_end(void) } } -//-// void menu_back(uint8_t nLevel) { menu_depth = ((menu_depth > nLevel) ? (menu_depth - nLevel) : 0); @@ -97,17 +96,6 @@ void menu_back(void) menu_back(1); } -/* -void menu_back(void) -{ - if (menu_depth > 0) - { - menu_depth--; - menu_goto(menu_stack[menu_depth].menu, menu_stack[menu_depth].position, true, true); - } -} -*/ - static void menu_back_no_reset(void) { if (menu_depth > 0) @@ -394,8 +382,3 @@ template uint8_t menu_item_edit_P(const char* str, int16_t *pval, int1 template uint8_t menu_item_edit_P(const char* str, uint8_t *pval, int16_t min_val, int16_t max_val); #undef _menu_data - - - - - diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 5e1e5471..e18b0932 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -1022,6 +1022,28 @@ void mmu_filament_ramming() } } +//-// +void extr_unload_() +{ +//if(bFilamentAction) +if(0) + { + bFilamentAction=false; + extr_unload(); + } +else { + eFilamentAction=e_FILAMENT_ACTION_mmuUnLoad; + bFilamentFirstRun=false; + if(target_temperature[0]>=EXTRUDE_MINTEMP) + { + bFilamentPreheatState=true; + mFilamentItem(target_temperature[0],target_temperature_bed); + } +// else menu_submenu(mFilamentMenu); + else mFilamentMenu(); + } +} + void extr_unload() { //unload just current filament for multimaterial printers #ifdef SNMM @@ -1030,11 +1052,8 @@ void extr_unload() uint8_t SilentMode = eeprom_read_byte((uint8_t*)EEPROM_SILENT); #endif -//-// if (degHotend0() > EXTRUDE_MINTEMP) -//if(current_temperature[0]>(target_temperature[0]*0.95)) -if(bFilamentAction) + if (degHotend0() > EXTRUDE_MINTEMP) { -bFilamentAction=false; #ifndef SNMM st_synchronize(); @@ -1108,13 +1127,7 @@ bFilamentAction=false; } else { - eFilamentAction=e_FILAMENT_ACTION_mmuUnLoad; - bFilamentFirstRun=false; - if(target_temperature[0]>=EXTRUDE_MINTEMP) { - bFilamentPreheatState=true; - mFilamentItem(target_temperature[0],target_temperature_bed); - } - else menu_submenu(mFilamentMenu); + show_preheat_nozzle_warning(); } //lcd_return_to_status(); } @@ -1172,51 +1185,71 @@ void extr_adj_4() void mmu_load_to_nozzle_0() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(0); } void mmu_load_to_nozzle_1() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(1); } void mmu_load_to_nozzle_2() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(2); } void mmu_load_to_nozzle_3() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(3); } void mmu_load_to_nozzle_4() { +//-// + menu_back(); lcd_mmu_load_to_nozzle(4); } void mmu_eject_fil_0() { +//-// + menu_back(); mmu_eject_filament(0, true); } void mmu_eject_fil_1() { +//-// + menu_back(); mmu_eject_filament(1, true); } void mmu_eject_fil_2() { +//-// + menu_back(); mmu_eject_filament(2, true); } void mmu_eject_fil_3() { +//-// + menu_back(); mmu_eject_filament(3, true); } void mmu_eject_fil_4() { +//-// + menu_back(); mmu_eject_filament(4, true); } @@ -1344,7 +1377,7 @@ void mmu_show_warning() void lcd_mmu_load_to_nozzle(uint8_t filament_nr) { //-// -bFilamentAction=false; +bFilamentAction=false; // NOT in "mmu_load_to_nozzle_menu()" if (degHotend0() > EXTRUDE_MINTEMP) { tmp_extruder = filament_nr; @@ -1377,7 +1410,8 @@ bFilamentAction=false; void mmu_eject_filament(uint8_t filament, bool recover) { //-// -bFilamentAction=false; +bFilamentAction=false; // NOT in "mmu_fil_eject_menu()" +return; if (filament < 5) { diff --git a/Firmware/mmu.h b/Firmware/mmu.h index 71930ae7..446c9aec 100644 --- a/Firmware/mmu.h +++ b/Firmware/mmu.h @@ -101,6 +101,8 @@ extern int get_ext_nr(); extern void display_loading(); extern void extr_adj(int extruder); extern void extr_unload(); +//-// +extern void extr_unload_(); extern void extr_adj_0(); extern void extr_adj_1(); extern void extr_adj_2(); diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 93651434..f6502cef 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2310,6 +2310,8 @@ bool bFilamentAction=false; static void mFilamentPrompt() { +uint8_t nLevel; + lcd_set_cursor(0,0); lcdui_print_temp(LCD_STR_THERMOMETER[0],(int)degHotend(0),(int)degTargetHotend(0)); lcd_set_cursor(0,2); @@ -2332,14 +2334,13 @@ switch(eFilamentAction) } if(lcd_clicked()) { -//./ menu_back(); -//./ menu_back(); -menu_back(2); + nLevel=2; if(!bFilamentPreheatState) { - menu_back(); -//-// setTargetHotend0(0.0); + nLevel++; +// setTargetHotend0(0.0); // uncoment if return to base state is required } + menu_back(nLevel); switch(eFilamentAction) { case e_FILAMENT_ACTION_Load: @@ -2350,20 +2351,27 @@ menu_back(2); case e_FILAMENT_ACTION_unLoad: enquecommand_P(PSTR("M702")); // unload filament break; +/* case e_FILAMENT_ACTION_mmuLoad: - MYSERIAL.println("mFilamentPrompt - mmuLoad"); -bFilamentAction=true; +//./ MYSERIAL.println("mFilamentPrompt - mmuLoad"); + bFilamentAction=true; menu_submenu(mmu_load_to_nozzle_menu); break; +*/ +/* case e_FILAMENT_ACTION_mmuUnLoad: -bFilamentAction=true; +//./ MYSERIAL.println("mFilamentPrompt - mmuUnLoad"); + bFilamentAction=true; extr_unload(); break; +*/ +/* case e_FILAMENT_ACTION_mmuEject: MYSERIAL.println("mFilamentPrompt - mmuEject"); -bFilamentAction=true; - menu_submenu(mmu_fil_eject_menu); + bFilamentAction=true; +// menu_submenu(mmu_fil_eject_menu); break; +*/ } if(eFilamentAction==e_FILAMENT_ACTION_autoLoad) eFilamentAction=e_FILAMENT_ACTION_none; // i.e. non-autoLoad @@ -2373,6 +2381,8 @@ bFilamentAction=true; void mFilamentItem(uint16_t nTemp,uint16_t nTempBed) { static int nTargetOld,nTargetBedOld; +uint8_t nLevel; +static bool bBeep=false; //if(bPreheatState) // not necessary nTargetOld=target_temperature[0]; @@ -2416,12 +2426,47 @@ if(lcd_clicked()) if(eFilamentAction==e_FILAMENT_ACTION_autoLoad) eFilamentAction=e_FILAMENT_ACTION_none; // i.e. non-autoLoad } -//./else if(!isHeatingHotend0()) -else if(current_temperature[0]>(target_temperature[0]*0.95)) +else { + if(current_temperature[0]>(target_temperature[0]*0.95)) { - menu_submenu(mFilamentPrompt); - Sound_MakeSound(e_SOUND_TYPE_StandardPrompt); + switch(eFilamentAction) + { + case e_FILAMENT_ACTION_Load: + case e_FILAMENT_ACTION_autoLoad: + case e_FILAMENT_ACTION_unLoad: + menu_submenu(mFilamentPrompt); + break; + case e_FILAMENT_ACTION_mmuLoad: + nLevel=1; + if(!bFilamentPreheatState) + nLevel++; + bFilamentAction=true; + menu_back(nLevel); + menu_submenu(mmu_load_to_nozzle_menu); + break; + case e_FILAMENT_ACTION_mmuUnLoad: + nLevel=1; + if(!bFilamentPreheatState) + nLevel++; + bFilamentAction=true; + menu_back(nLevel); + extr_unload(); + break; + case e_FILAMENT_ACTION_mmuEject: + nLevel=1; + if(!bFilamentPreheatState) + nLevel++; + bFilamentAction=true; + menu_back(nLevel); + menu_submenu(mmu_fil_eject_menu); + break; + } + if(bBeep) + Sound_MakeSound(e_SOUND_TYPE_StandardPrompt); + bBeep=false; } + else bBeep=true; + } } static void mFilamentItem_PLA() @@ -5643,10 +5688,8 @@ static void fil_load_menu() static void mmu_load_to_nozzle_menu() { //-//if (degHotend0() > EXTRUDE_MINTEMP) -//if(current_temperature[0]>(target_temperature[0]*0.95)) if(bFilamentAction) { -//../bFilamentAction=false; MENU_BEGIN(); MENU_ITEM_BACK_P(_T(MSG_MAIN)); MENU_ITEM_FUNCTION_P(_i("Load filament 1"), mmu_load_to_nozzle_0); @@ -5671,10 +5714,8 @@ else { static void mmu_fil_eject_menu() { //-//if (degHotend0() > EXTRUDE_MINTEMP) -//if(current_temperature[0]>(target_temperature[0]*0.95)) if(bFilamentAction) { -//../bFilamentAction=false; MENU_BEGIN(); MENU_ITEM_BACK_P(_T(MSG_MAIN)); MENU_ITEM_FUNCTION_P(_i("Eject filament 1"), mmu_eject_fil_0); @@ -5685,7 +5726,6 @@ if(bFilamentAction) MENU_END(); } else { - MYSERIAL.println(" eject - else"); eFilamentAction=e_FILAMENT_ACTION_mmuEject; bFilamentFirstRun=false; if(target_temperature[0]>=EXTRUDE_MINTEMP) @@ -6166,7 +6206,8 @@ static void lcd_main_menu() MENU_ITEM_SUBMENU_P(_T(MSG_LOAD_FILAMENT), fil_load_menu); MENU_ITEM_SUBMENU_P(_i("Load to nozzle"), mmu_load_to_nozzle_menu); //-// MENU_ITEM_FUNCTION_P(_T(MSG_UNLOAD_FILAMENT), extr_unload); - MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), extr_unload); +//bFilamentFirstRun=true; + MENU_ITEM_SUBMENU_P(_T(MSG_UNLOAD_FILAMENT), extr_unload_); MENU_ITEM_SUBMENU_P(_i("Eject filament"), mmu_fil_eject_menu); } else From 6ad5c07e6d4dd438d4b43a9d51bb976a97caeb4a Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 21 Feb 2019 14:28:05 +0100 Subject: [PATCH 4/6] comments --- Firmware/cmdqueue.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Firmware/cmdqueue.cpp b/Firmware/cmdqueue.cpp index 2f892c9c..c7035ba1 100644 --- a/Firmware/cmdqueue.cpp +++ b/Firmware/cmdqueue.cpp @@ -94,7 +94,11 @@ void cmdqueue_reset() bufindr = 0; bufindw = 0; buflen = 0; - cmdbuffer_front_already_processed = true; + + //commands are removed from command queue after process_command() function is finished + //reseting command queue and enqueing new commands during some (usually long running) command processing would cause that new commands are immediately removed from queue (or damaged) + //this will ensure that all new commands which are enqueued after cmdqueue reset, will be always executed + cmdbuffer_front_already_processed = true; } // How long a string could be pushed to the front of the command queue? From ed93f1b7f0127e505f41b5bdadc97dec9076173c Mon Sep 17 00:00:00 2001 From: MRprusa3d Date: Thu, 21 Feb 2019 15:27:22 +0100 Subject: [PATCH 5/6] preHeat @ filament management another funcionality IIb --- Firmware/mmu.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index e18b0932..2f7bf96c 100644 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -1411,7 +1411,6 @@ void mmu_eject_filament(uint8_t filament, bool recover) { //-// bFilamentAction=false; // NOT in "mmu_fil_eject_menu()" -return; if (filament < 5) { From da28773480b013d9f8dcb812e2167152fdad5f35 Mon Sep 17 00:00:00 2001 From: PavelSindler Date: Thu, 21 Feb 2019 19:16:24 +0100 Subject: [PATCH 6/6] version change --- Firmware/Configuration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Firmware/Configuration.h b/Firmware/Configuration.h index d1f67069..13d2f1a0 100644 --- a/Firmware/Configuration.h +++ b/Firmware/Configuration.h @@ -7,8 +7,8 @@ #define STR(x) STR_HELPER(x) // Firmware version -#define FW_VERSION "3.5.3" -#define FW_COMMIT_NR 2007 +#define FW_VERSION "3.6.0-RC1" +#define FW_COMMIT_NR 2060 // FW_VERSION_UNKNOWN means this is an unofficial build. // The firmware should only be checked into github with this symbol. #define FW_DEV_VERSION FW_VERSION_UNKNOWN