Pārlūkot izejas kodu

Fixes power mode in Tune menu...
...and changed the filament runout procedure
Druing the print you can access the Tune menu and the new feature Power Mode [auto] was added, but choosing it it goes to the Settings menu. Here the fix for that in the ultralcd.cpp.
Also changed the filament runout procedure in Marlin_main.cpp to use M600 command (origin idea/update from Marlin 1.1.x) defined in the 1_75mm_MKx_yyyy_E3dv6full.h files

3d-gussner 7 gadi atpakaļ
vecāks
revīzija
713527bf4a

+ 4 - 3
Firmware/Marlin_main.cpp

@@ -2429,7 +2429,7 @@ void process_commands()
         return;
     } else if (code_seen("SERIAL HIGH")) {
         MYSERIAL.println("SERIAL HIGH");
-        MYSERIAL.begin(1152000);
+        MYSERIAL.begin(115200);
         return;
     } else if(code_seen("Beat")) {
         // Kick farm link timer
@@ -2457,8 +2457,9 @@ void process_commands()
         #ifdef FILAMENT_RUNOUT_SUPPORT
             
             if(READ(FR_SENS)){
+			enquecommand_front_P((PSTR(FILAMENT_RUNOUT_SCRIPT)));
 
-                        feedmultiplyBckp=feedmultiply;
+/*                        feedmultiplyBckp=feedmultiply;
                         float target[4];
                         float lastpos[4];
                         target[X_AXIS]=current_position[X_AXIS];
@@ -2620,7 +2621,7 @@ void process_commands()
 
                         sprintf_P(cmd, PSTR("M220 S%i"), feedmultiplyBckp);
                         enquecommand(cmd);
-
+*/
             }
 
 

+ 19 - 17
Firmware/ultralcd.cpp

@@ -3054,6 +3054,19 @@ static void lcd_silent_mode_set() {
   digipot_init();
   lcd_goto_menu(lcd_settings_menu, 7);
 }
+
+static void lcd_silent_mode_set_tune() {
+  switch (SilentModeMenu) {
+  case 0: SilentModeMenu = 1; break;
+  case 1: SilentModeMenu = 2; break;
+  case 2: SilentModeMenu = 0; break;
+  default: SilentModeMenu = 0; break;
+  }
+  eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
+  digipot_init();
+  lcd_goto_menu(lcd_tune_menu, 8);
+}
+
 static void lcd_set_lang(unsigned char lang) {
   lang_selected = lang;
   firstrun = 1;
@@ -4745,17 +4758,6 @@ static void lcd_autostart_sd()
 }
 
 
-static void lcd_silent_mode_set_tune() {
-  switch (SilentModeMenu) {
-  case 0: SilentModeMenu = 1; break;
-  case 1: SilentModeMenu = 2; break;
-  case 2: SilentModeMenu = 0; break;
-  default: SilentModeMenu = 0; break;
-  }
-  eeprom_update_byte((unsigned char *)EEPROM_SILENT, SilentModeMenu);
-  digipot_init();
-  lcd_goto_menu(lcd_tune_menu, 9);
-}
 #endif
 
 static void lcd_colorprint_change() {
@@ -4787,13 +4789,13 @@ static void lcd_tune_menu()
 #ifdef FILAMENTCHANGEENABLE
   MENU_ITEM(function, MSG_FILAMENTCHANGE, lcd_colorprint_change);//7
 #endif
-  
-  if (!farm_mode) { //dont show in menu if we are in farm mode
+
+  if (!farm_mode) { //dont show in menu if we are in farm mode //8
 	  switch (SilentModeMenu) {
-	  case 0: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); break;
-	  case 1: MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set); break;
-	  case 2: MENU_ITEM(function, MSG_AUTO_MODE_ON, lcd_silent_mode_set); break;
-	  default: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set); break;
+	  case 0: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set_tune); break;
+	  case 1: MENU_ITEM(function, MSG_SILENT_MODE_ON, lcd_silent_mode_set_tune); break;
+	  case 2: MENU_ITEM(function, MSG_AUTO_MODE_ON, lcd_silent_mode_set_tune); break;
+	  default: MENU_ITEM(function, MSG_SILENT_MODE_OFF, lcd_silent_mode_set_tune); break;
 	  }
   }
   END_MENU();

+ 1 - 0
Firmware/variants/1_75mm_MK1-RAMBo10a-E3Dv6full.h

@@ -177,6 +177,7 @@ ADDITIONAL FEATURES SETTINGS
 
 #ifdef FILAMENT_RUNOUT_SUPPORT
 #define FILAMENT_RUNOUT_SENSOR 1
+#define FILAMENT_RUNOUT_SCRIPT "M600"
 #endif
 
 // temperature runaway

+ 1 - 0
Firmware/variants/1_75mm_MK1-RAMBo13a-E3Dv6full.h

@@ -177,6 +177,7 @@ ADDITIONAL FEATURES SETTINGS
 
 #ifdef FILAMENT_RUNOUT_SUPPORT
 #define FILAMENT_RUNOUT_SENSOR 1
+#define FILAMENT_RUNOUT_SCRIPT "M600"
 #endif
 
 // temperature runaway

+ 1 - 0
Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo10a-E3Dv6full.h

@@ -172,6 +172,7 @@ ADDITIONAL FEATURES SETTINGS
 
 #ifdef FILAMENT_RUNOUT_SUPPORT
 #define FILAMENT_RUNOUT_SENSOR 1
+#define FILAMENT_RUNOUT_SCRIPT "M600"
 #endif
 
 // temperature runaway

+ 1 - 0
Firmware/variants/1_75mm_MK2-MultiMaterial-RAMBo13a-E3Dv6full.h

@@ -174,6 +174,7 @@ ADDITIONAL FEATURES SETTINGS
 
 #ifdef FILAMENT_RUNOUT_SUPPORT
 #define FILAMENT_RUNOUT_SENSOR 1
+#define FILAMENT_RUNOUT_SCRIPT "M600"
 #endif
 
 // temperature runaway

+ 1 - 0
Firmware/variants/1_75mm_MK2-RAMBo10a-E3Dv6full.h

@@ -172,6 +172,7 @@ ADDITIONAL FEATURES SETTINGS
 
 #ifdef FILAMENT_RUNOUT_SUPPORT
 #define FILAMENT_RUNOUT_SENSOR 1
+#define FILAMENT_RUNOUT_SCRIPT "M600"
 #endif
 
 // temperature runaway

+ 1 - 0
Firmware/variants/1_75mm_MK2-RAMBo13a-E3Dv6full.h

@@ -174,6 +174,7 @@ ADDITIONAL FEATURES SETTINGS
 
 #ifdef FILAMENT_RUNOUT_SUPPORT
 #define FILAMENT_RUNOUT_SENSOR 1
+#define FILAMENT_RUNOUT_SCRIPT "M600"
 #endif
 
 // temperature runaway