Browse Source

PID cal. is not sending OK periodically, print fan error pauses print in octoprint (not disconnecting), initialize serial line when swithing in settings menu

PavelSindler 6 years ago
parent
commit
cbcfcee48f
3 changed files with 10 additions and 21 deletions
  1. 3 15
      Firmware/Marlin_main.cpp
  2. 6 6
      Firmware/temperature.cpp
  3. 1 0
      Firmware/ultralcd.cpp

+ 3 - 15
Firmware/Marlin_main.cpp

@@ -3852,15 +3852,7 @@ void process_commands()
 		lcd_update(2);
 		break;
 	default:
-		printf("Unknown G code: ");
-		printf(cmdbuffer + bufindr + CMDHDRSIZE);
-		printf("\n");
-
-
-
-
-
-
+		printf_P(PSTR("Unknown G code: %s \n"), cmdbuffer + bufindr + CMDHDRSIZE);
     }
   } // end if(code_seen('G'))
 
@@ -3871,9 +3863,7 @@ void process_commands()
 	   
 	 /*for (++strchr_pointer; *strchr_pointer == ' ' || *strchr_pointer == '\t'; ++strchr_pointer);*/
 	  if (*(strchr_pointer+index) < '0' || *(strchr_pointer+index) > '9') {
-		  printf("Invalid M code: ");
-		  printf(cmdbuffer + bufindr + CMDHDRSIZE);
-		  printf("\n");
+		  printf_P(PSTR("Invalid M code: %s \n"), cmdbuffer + bufindr + CMDHDRSIZE);
 
 	  } else
     switch((int)code_value())
@@ -6176,9 +6166,7 @@ case 404:  //M404 Enter the nominal filament width (3mm, 1.75mm ) N<3.0> or disp
       FlushSerialRequestResend();
     break;
 	default: 
-		printf("Unknown M code: ");
-		printf(cmdbuffer + bufindr + CMDHDRSIZE);
-		printf("\n");
+		printf_P(PSTR("Unknown M code: %s \n"), cmdbuffer + bufindr + CMDHDRSIZE);
     }
 	
   } // end if(code_seen('M')) (end of M codes)

+ 6 - 6
Firmware/temperature.cpp

@@ -362,10 +362,10 @@ unsigned long watchmillis[EXTRUDERS] = ARRAY_BY_EXTRUDERS(0,0,0);
       int p;
       if (extruder<0){
         p=soft_pwm_bed;       
-        SERIAL_PROTOCOLPGM("ok B:");
+        SERIAL_PROTOCOLPGM("B:");
       }else{
         p=soft_pwm[extruder];       
-        SERIAL_PROTOCOLPGM("ok T:");
+        SERIAL_PROTOCOLPGM("T:");
       }
 			
       SERIAL_PROTOCOL(input);   
@@ -500,12 +500,12 @@ void fanSpeedError(unsigned char _fan) {
 		}
 	}
 	else {
-		setTargetHotend0(0);
+			setTargetHotend0(0);
+			SERIAL_ECHOLNPGM("// action:pause"); //for octoprint
 	}
-	SERIAL_ERROR_START;
 	switch (_fan) {
 	case 0:
-			SERIAL_ERRORLNPGM("ERROR: Extruder fan speed is lower then expected");
+			SERIAL_ECHOLNPGM("Extruder fan speed is lower then expected");
 			if (get_message_level() == 0) {
 				WRITE(BEEPER, HIGH);
 				delayMicroseconds(200);
@@ -515,7 +515,7 @@ void fanSpeedError(unsigned char _fan) {
 			}
 		break;
 	case 1:
-			SERIAL_ERRORLNPGM("ERROR: Print fan speed is lower then expected");
+			SERIAL_ECHOLNPGM("Print fan speed is lower then expected");
 			if (get_message_level() == 0) {
 				WRITE(BEEPER, HIGH);
 				delayMicroseconds(200);

+ 1 - 0
Firmware/ultralcd.cpp

@@ -3501,6 +3501,7 @@ void lcd_second_serial_set() {
 	if(selectedSerialPort == 1) selectedSerialPort = 0;
 	else selectedSerialPort = 1;
 	eeprom_update_byte((unsigned char *)EEPROM_SECOND_SERIAL_ACTIVE, selectedSerialPort);
+	MYSERIAL.begin(BAUDRATE);
 	lcd_goto_menu(lcd_settings_menu, 11);
 }