Browse Source

czech messages corrected; temp. calibration: improved serial communication, disable steppers after calibration, preheat phase on start print when running from octoprint,

PavelSindler 8 years ago
parent
commit
fefa240cd7

+ 3 - 1
Firmware/Marlin.h

@@ -321,6 +321,7 @@ extern unsigned long pause_time;
 extern unsigned long start_pause_print;
 
 extern bool mesh_bed_leveling_flag;
+extern bool mesh_bed_run_from_menu;
 
 extern void calculate_volumetric_multipliers();
 
@@ -342,4 +343,5 @@ void bed_analysis(float x_dimension, float y_dimension, int x_points_num, int y_
 float temp_comp_interpolation(float temperature);
 void temp_compensation_apply();
 void temp_compensation_start();
-void wait_for_heater(long codenum);
+void wait_for_heater(long codenum);
+void serialecho_temperatures();

+ 50 - 15
Firmware/Marlin_main.cpp

@@ -270,6 +270,7 @@ unsigned long start_pause_print = millis();
 unsigned long load_filament_time;
 
 bool mesh_bed_leveling_flag = false;
+bool mesh_bed_run_from_menu = false;
 
 unsigned char lang_selected = 0;
 int8_t FarmMode = 0;
@@ -2775,7 +2776,7 @@ void process_commands()
 			enquecommand_front_P((PSTR("G28 W0")));
 			break;
 		}
-		
+		SERIAL_ECHOLNPGM("PINDA probe calibration start");
 		custom_message = true;
 		custom_message_type = 4;
 		custom_message_state = 1;
@@ -2786,10 +2787,16 @@ void process_commands()
 		plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
 		st_synchronize();
 		
-		while (abs(degBed() - PINDA_MIN_T) > 1 ) delay_keep_alive(1000);
+		while (abs(degBed() - PINDA_MIN_T) > 1) {
+			delay_keep_alive(1000);
+			serialecho_temperatures();
+		}
 		
 		//enquecommand_P(PSTR("M190 S50"));
-		for (int i = 0; i < PINDA_HEAT_T; i++)	delay_keep_alive(1000);
+		for (int i = 0; i < PINDA_HEAT_T; i++) {
+			delay_keep_alive(1000);
+			serialecho_temperatures();
+		}
 		eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 0); //invalidate temp. calibration in case that in will be aborted during the calibration process 
 
 		current_position[Z_AXIS] = 5;
@@ -2810,6 +2817,9 @@ void process_commands()
 		SERIAL_ECHOLNPGM("");
 
 		for (int i = 0; i<5; i++) {
+			SERIAL_ECHOPGM("Step: ");
+			MYSERIAL.print(i+2);
+			SERIAL_ECHOLNPGM("/6");
 			custom_message_state = i + 2;
 			t_c = 60 + i * 10;
 
@@ -2819,8 +2829,14 @@ void process_commands()
 			current_position[Z_AXIS] = PINDA_PREHEAT_Z;
 			plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
 			st_synchronize();
-			while (degBed() < t_c) delay_keep_alive(1000);
-			for (int i = 0; i < PINDA_HEAT_T; i++)	delay_keep_alive(1000);
+			while (degBed() < t_c) {
+				delay_keep_alive(1000);
+				serialecho_temperatures();
+			}
+			for (int i = 0; i < PINDA_HEAT_T; i++) {
+				delay_keep_alive(1000);
+				serialecho_temperatures();
+			}
 			current_position[Z_AXIS] = 5;
 			plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 3000 / 60, active_extruder);
 			current_position[X_AXIS] = pgm_read_float(bed_ref_points);
@@ -2845,6 +2861,13 @@ void process_commands()
 		custom_message = false;
 
 		eeprom_update_byte((uint8_t*)EEPROM_CALIBRATION_STATUS_PINDA, 1);
+		SERIAL_ECHOLNPGM("Temperature calibration done. Continue with pressing the knob.");
+			disable_x();
+			disable_y();
+			disable_z();
+			disable_e0();
+			disable_e1();
+			disable_e2();
 		lcd_show_fullscreen_message_and_wait_P(MSG_TEMP_CALIBRATION_DONE);
 		lcd_update_enable(true);
 		lcd_update(2);		
@@ -2919,7 +2942,7 @@ void process_commands()
 			break;
 		} 
 		
-		if (run == false && card.sdprinting == true && temp_cal_active == true && calibration_status_pinda() == true) {
+		if (run == false && temp_cal_active == true && calibration_status_pinda() == true && target_temperature_bed >= 50) {
 			temp_compensation_start();
 			run = true;
 			repeatcommand_front(); // repeat G80 with all its parameters
@@ -3132,7 +3155,7 @@ void process_commands()
 		go_home_with_z_lift();
 		SERIAL_ECHOLNPGM("Go home finished");
 		//unretract (after PINDA preheat retraction)
-		if (card.sdprinting == true && degHotend(active_extruder) > EXTRUDE_MINTEMP && temp_cal_active == true && calibration_status_pinda() == true) {
+		if (degHotend(active_extruder) > EXTRUDE_MINTEMP && temp_cal_active == true && calibration_status_pinda() == true && target_temperature_bed >= 50) {
 			current_position[E_AXIS] += DEFAULT_RETRACTION;
 			plan_buffer_line(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS], current_position[E_AXIS], 400, active_extruder);
 		}
@@ -3141,6 +3164,7 @@ void process_commands()
 		custom_message_type = custom_message_type_old;
 		custom_message_state = custom_message_state_old;
 		mesh_bed_leveling_flag = false;
+		mesh_bed_run_from_menu = false;
 		lcd_update(2);
 		
 	}
@@ -4246,14 +4270,14 @@ Sigma_Exit:
         else
         {
           st_synchronize();
-          if(code_seen('X')) disable_x();
-          if(code_seen('Y')) disable_y();
-          if(code_seen('Z')) disable_z();
-          #if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
-            if(code_seen('E')) {
-              disable_e0();
-              disable_e1();
-              disable_e2();
+		  if (code_seen('X')) disable_x();
+		  if (code_seen('Y')) disable_y();
+		  if (code_seen('Z')) disable_z();
+#if ((E0_ENABLE_PIN != X_ENABLE_PIN) && (E1_ENABLE_PIN != Y_ENABLE_PIN)) // Only enable on boards that have seperate ENABLE_PINS
+		  if (code_seen('E')) {
+			  disable_e0();
+			  disable_e1();
+			  disable_e2();
             }
           #endif
         }
@@ -6528,4 +6552,15 @@ void long_pause() //long pause print
 	fanSpeed = 0;
 
 	st_synchronize();
+}
+
+void serialecho_temperatures() {
+	float tt = degHotend(active_extruder);
+	SERIAL_PROTOCOLPGM("T:");
+	SERIAL_PROTOCOL(tt);
+	SERIAL_PROTOCOLPGM(" E:");
+	SERIAL_PROTOCOL((int)active_extruder);
+	SERIAL_PROTOCOLPGM(" B:");
+	SERIAL_PROTOCOL_F(degBed(), 1);
+	SERIAL_PROTOCOLLN("");
 }

+ 17 - 10
Firmware/language_all.cpp

@@ -882,7 +882,7 @@ const char * const MSG_FILAMENT_CLEAN_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_FILAMENT_LOADING_T0_EN[] PROGMEM = "Insert filament into extruder 1. Click when done.";
-const char MSG_FILAMENT_LOADING_T0_CZ[] PROGMEM = "Vlo\x9Ete filament do extruderu 1. Potvrdte tlacitkem.";
+const char MSG_FILAMENT_LOADING_T0_CZ[] PROGMEM = "Vlozte filament do extruderu 1. Potvrdte tlacitkem.";
 const char MSG_FILAMENT_LOADING_T0_IT[] PROGMEM = "Inserire filamento nell'estrusore 1. Click per continuare.";
 const char MSG_FILAMENT_LOADING_T0_ES[] PROGMEM = "Insertar filamento en el extrusor 1. Haga clic una vez terminado.";
 const char MSG_FILAMENT_LOADING_T0_PL[] PROGMEM = "Wloz filament do ekstrudera 1. Potwierdz przyciskiem.";
@@ -897,7 +897,7 @@ const char * const MSG_FILAMENT_LOADING_T0_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_FILAMENT_LOADING_T1_EN[] PROGMEM = "Insert filament into extruder 2. Click when done.";
-const char MSG_FILAMENT_LOADING_T1_CZ[] PROGMEM = "Vlo\x9Ete filament do extruderu 2. Potvrdte tlacitkem.";
+const char MSG_FILAMENT_LOADING_T1_CZ[] PROGMEM = "Vlozte filament do extruderu 2. Potvrdte tlacitkem.";
 const char MSG_FILAMENT_LOADING_T1_IT[] PROGMEM = "Inserire filamento nell'estrusore 2. Click per continuare.";
 const char MSG_FILAMENT_LOADING_T1_ES[] PROGMEM = "Insertar filamento en el extrusor 2. Haga clic una vez terminado.";
 const char MSG_FILAMENT_LOADING_T1_PL[] PROGMEM = "Wloz filament do ekstrudera 2. Potwierdz przyciskiem.";
@@ -912,7 +912,7 @@ const char * const MSG_FILAMENT_LOADING_T1_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_FILAMENT_LOADING_T2_EN[] PROGMEM = "Insert filament into extruder 3. Click when done.";
-const char MSG_FILAMENT_LOADING_T2_CZ[] PROGMEM = "Vlo\x9Ete filament do extruderu 3. Potvrdte tlacitkem.";
+const char MSG_FILAMENT_LOADING_T2_CZ[] PROGMEM = "Vlozte filament do extruderu 3. Potvrdte tlacitkem.";
 const char MSG_FILAMENT_LOADING_T2_IT[] PROGMEM = "Inserire filamento nell'estrusore 3. Click per continuare.";
 const char MSG_FILAMENT_LOADING_T2_ES[] PROGMEM = "Insertar filamento en el extrusor 3. Haga clic una vez terminado.";
 const char MSG_FILAMENT_LOADING_T2_PL[] PROGMEM = "Wloz filament do ekstrudera 3. Potwierdz przyciskiem.";
@@ -927,7 +927,7 @@ const char * const MSG_FILAMENT_LOADING_T2_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_FILAMENT_LOADING_T3_EN[] PROGMEM = "Insert filament into extruder 4. Click when done.";
-const char MSG_FILAMENT_LOADING_T3_CZ[] PROGMEM = "Vlo\x9Ete filament do extruderu 4. Potvrdte tlacitkem.";
+const char MSG_FILAMENT_LOADING_T3_CZ[] PROGMEM = "Vlozte filament do extruderu 4. Potvrdte tlacitkem.";
 const char MSG_FILAMENT_LOADING_T3_IT[] PROGMEM = "Inserire filamento nell'estrusore 4. Click per continuare.";
 const char MSG_FILAMENT_LOADING_T3_ES[] PROGMEM = "Insertar filamento en el extrusor 4. Haga clic una vez terminado.";
 const char MSG_FILAMENT_LOADING_T3_PL[] PROGMEM = "Wloz filament do ekstrudera 4. Potwierdz przyciskiem.";
@@ -1951,7 +1951,14 @@ const char * const MSG_PREHEAT_NOZZLE_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_PREPARE_FILAMENT_EN[] PROGMEM = "Prepare new filament";
-const char * const MSG_PREPARE_FILAMENT_LANG_TABLE[1] PROGMEM = {
+const char MSG_PREPARE_FILAMENT_ES[] PROGMEM = "Preparar filamento";
+const char MSG_PREPARE_FILAMENT_PL[] PROGMEM = "Przygotuj filament";
+const char * const MSG_PREPARE_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
+	MSG_PREPARE_FILAMENT_EN,
+	MSG_PREPARE_FILAMENT_EN,
+	MSG_PREPARE_FILAMENT_EN,
+	MSG_PREPARE_FILAMENT_ES,
+	MSG_PREPARE_FILAMENT_PL,
 	MSG_PREPARE_FILAMENT_EN
 };
 
@@ -1959,7 +1966,7 @@ const char MSG_PRESS_EN[] PROGMEM = "and press the knob";
 const char MSG_PRESS_CZ[] PROGMEM = "a stisknete tlacitko";
 const char MSG_PRESS_IT[] PROGMEM = "e cliccare manopola";
 const char MSG_PRESS_ES[] PROGMEM = "Pulsar el mando";
-const char MSG_PRESS_PL[] PROGMEM = "i nacisnij przycisk";
+const char MSG_PRESS_PL[] PROGMEM = "Nacisnij przycisk";
 const char MSG_PRESS_DE[] PROGMEM = "und Knopf druecken";
 const char * const MSG_PRESS_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_PRESS_EN,
@@ -3036,7 +3043,7 @@ const char * const MSG_UNLOAD_FILAMENT_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_UNLOAD_FILAMENT_1_EN[] PROGMEM = "Unload filament 1";
-const char MSG_UNLOAD_FILAMENT_1_CZ[] PROGMEM = "Vyjmout filament 1";
+const char MSG_UNLOAD_FILAMENT_1_CZ[] PROGMEM = "Vyjmout filam. 1";
 const char * const MSG_UNLOAD_FILAMENT_1_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_UNLOAD_FILAMENT_1_EN,
 	MSG_UNLOAD_FILAMENT_1_CZ,
@@ -3047,7 +3054,7 @@ const char * const MSG_UNLOAD_FILAMENT_1_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_UNLOAD_FILAMENT_2_EN[] PROGMEM = "Unload filament 2";
-const char MSG_UNLOAD_FILAMENT_2_CZ[] PROGMEM = "Vyjmout filament 2";
+const char MSG_UNLOAD_FILAMENT_2_CZ[] PROGMEM = "Vyjmout filam. 2";
 const char * const MSG_UNLOAD_FILAMENT_2_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_UNLOAD_FILAMENT_2_EN,
 	MSG_UNLOAD_FILAMENT_2_CZ,
@@ -3058,7 +3065,7 @@ const char * const MSG_UNLOAD_FILAMENT_2_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_UNLOAD_FILAMENT_3_EN[] PROGMEM = "Unload filament 3";
-const char MSG_UNLOAD_FILAMENT_3_CZ[] PROGMEM = "Vyjmout filament 3";
+const char MSG_UNLOAD_FILAMENT_3_CZ[] PROGMEM = "Vyjmout filam. 3";
 const char * const MSG_UNLOAD_FILAMENT_3_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_UNLOAD_FILAMENT_3_EN,
 	MSG_UNLOAD_FILAMENT_3_CZ,
@@ -3069,7 +3076,7 @@ const char * const MSG_UNLOAD_FILAMENT_3_LANG_TABLE[LANG_NUM] PROGMEM = {
 };
 
 const char MSG_UNLOAD_FILAMENT_4_EN[] PROGMEM = "Unload filament 4";
-const char MSG_UNLOAD_FILAMENT_4_CZ[] PROGMEM = "Vyjmout filament 4";
+const char MSG_UNLOAD_FILAMENT_4_CZ[] PROGMEM = "Vyjmout filam. 4";
 const char * const MSG_UNLOAD_FILAMENT_4_LANG_TABLE[LANG_NUM] PROGMEM = {
 	MSG_UNLOAD_FILAMENT_4_EN,
 	MSG_UNLOAD_FILAMENT_4_CZ,

+ 2 - 2
Firmware/language_all.h

@@ -379,8 +379,8 @@ extern const char* const MSG_PREHEAT_LANG_TABLE[LANG_NUM];
 #define MSG_PREHEAT LANG_TABLE_SELECT(MSG_PREHEAT_LANG_TABLE)
 extern const char* const MSG_PREHEAT_NOZZLE_LANG_TABLE[LANG_NUM];
 #define MSG_PREHEAT_NOZZLE LANG_TABLE_SELECT(MSG_PREHEAT_NOZZLE_LANG_TABLE)
-extern const char* const MSG_PREPARE_FILAMENT_LANG_TABLE[1];
-#define MSG_PREPARE_FILAMENT LANG_TABLE_SELECT_EXPLICIT(MSG_PREPARE_FILAMENT_LANG_TABLE, 0)
+extern const char* const MSG_PREPARE_FILAMENT_LANG_TABLE[LANG_NUM];
+#define MSG_PREPARE_FILAMENT LANG_TABLE_SELECT(MSG_PREPARE_FILAMENT_LANG_TABLE)
 extern const char* const MSG_PRESS_LANG_TABLE[LANG_NUM];
 #define MSG_PRESS LANG_TABLE_SELECT(MSG_PRESS_LANG_TABLE)
 extern const char* const MSG_PRINTER_DISCONNECTED_LANG_TABLE[1];

+ 5 - 5
Firmware/language_cz.h

@@ -73,15 +73,15 @@
 #define MSG_SETTINGS                         "Nastaveni"
 #define MSG_PREHEAT                         "Predehrev"
 #define MSG_UNLOAD_FILAMENT                 "Vyjmout filament"
-#define MSG_LOAD_FILAMENT                 "Zavest filament"
+#define MSG_LOAD_FILAMENT					"Zavest filament"
 #define MSG_LOAD_FILAMENT_1					"Zavest filament 1"
 #define MSG_LOAD_FILAMENT_2					"Zavest filament 2"
 #define MSG_LOAD_FILAMENT_3					"Zavest filament 3"
 #define MSG_LOAD_FILAMENT_4					"Zavest filament 4"
-#define MSG_UNLOAD_FILAMENT_1				"Vyjmout filament 1"
-#define MSG_UNLOAD_FILAMENT_2				"Vyjmout filament 2"
-#define MSG_UNLOAD_FILAMENT_3				"Vyjmout filament 3"
-#define MSG_UNLOAD_FILAMENT_4				"Vyjmout filament 4"
+#define MSG_UNLOAD_FILAMENT_1				"Vyjmout filam. 1"
+#define MSG_UNLOAD_FILAMENT_2				"Vyjmout filam. 2"
+#define MSG_UNLOAD_FILAMENT_3				"Vyjmout filam. 3"
+#define MSG_UNLOAD_FILAMENT_4				"Vyjmout filam. 4"
 #define MSG_UNLOAD_ALL						"Vyjmout vse"
 #define MSG_LOAD_ALL						"Zavest vse"
 

+ 10 - 10
Firmware/language_en.h

@@ -69,16 +69,16 @@
 
 #define MSG_SETTINGS                         "Settings"
 #define MSG_PREHEAT                         "Preheat"
-#define MSG_UNLOAD_FILAMENT                 "Unload filament"
-#define MSG_LOAD_FILAMENT                 "Load filament"
-#define MSG_LOAD_FILAMENT_1					"Load filament 1"
-#define MSG_LOAD_FILAMENT_2					"Load filament 2"
-#define MSG_LOAD_FILAMENT_3					"Load filament 3"
-#define MSG_LOAD_FILAMENT_4					"Load filament 4"
-#define MSG_UNLOAD_FILAMENT_1				"Unload filament 1"
-#define MSG_UNLOAD_FILAMENT_2				"Unload filament 2"
-#define MSG_UNLOAD_FILAMENT_3				"Unload filament 3"
-#define MSG_UNLOAD_FILAMENT_4				"Unload filament 4"
+#define(length=17) MSG_UNLOAD_FILAMENT               "Unload filament"
+#define(length=17) MSG_LOAD_FILAMENT                 "Load filament"
+#define(length=17) MSG_LOAD_FILAMENT_1				"Load filament 1"
+#define(length=17) MSG_LOAD_FILAMENT_2				"Load filament 2"
+#define(length=17) MSG_LOAD_FILAMENT_3				"Load filament 3"
+#define(length=17) MSG_LOAD_FILAMENT_4				"Load filament 4"
+#define(length=17) MSG_UNLOAD_FILAMENT_1				"Unload filament 1"
+#define(length=17) MSG_UNLOAD_FILAMENT_2				"Unload filament 2"
+#define(length=17) MSG_UNLOAD_FILAMENT_3				"Unload filament 3"
+#define(length=17) MSG_UNLOAD_FILAMENT_4				"Unload filament 4"
 #define MSG_UNLOAD_ALL						"Unload all"
 #define MSG_LOAD_ALL						"Load all"
 

+ 1 - 2
Firmware/ultralcd.cpp

@@ -523,7 +523,6 @@ void lcd_commands()
 		if(lcd_commands_step == 0) { 
 			card.pauseSDPrint();
 			lcd_setstatuspgm(MSG_FINISHING_MOVEMENTS);
-
 			lcdDrawUpdate = 3;
 			lcd_commands_step = 1;
 		}
@@ -2367,7 +2366,7 @@ static void lcd_language_menu()
 
 void lcd_mesh_bedleveling()
 {
-
+	mesh_bed_run_from_menu = true;
 	enquecommand_P(PSTR("G80"));
 	lcd_return_to_status();
 }