Browse Source

octoprint fan error fix

NotaRobotexe 4 years ago
parent
commit
b8fec59f21
3 changed files with 12 additions and 3 deletions
  1. 9 2
      Firmware/Marlin_main.cpp
  2. 2 1
      Firmware/temperature.cpp
  3. 1 0
      Firmware/ultralcd.cpp

+ 9 - 2
Firmware/Marlin_main.cpp

@@ -3393,8 +3393,15 @@ void process_commands()
   if (fan_check_error){
 	if( fan_check_error == EFCE_DETECTED ){
 		fan_check_error = EFCE_REPORTED;
-		lcd_pause_print();
-	} // otherwise it has already been reported, so just ignore further processing
+      
+      if(is_usb_printing){
+        SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSE);
+      }
+      else{
+        lcd_pause_print();
+      }
+
+    } // otherwise it has already been reported, so just ignore further processing
     return;
   }
   #endif

+ 2 - 1
Firmware/temperature.cpp

@@ -524,6 +524,8 @@ void checkFanSpeed()
 		fan_speed_errors[1] = 0;
 		fanSpeedError(1); //print fan
 	}
+
+  SERIAL_PROTOCOLLNRPGM(MSG_OK); //for octoprint
 }
 
 //! Prints serialMsg to serial port, displays lcdMsg onto the LCD and beeps.
@@ -547,7 +549,6 @@ void fanSpeedError(unsigned char _fan) {
 		}
 		else {
 			fan_check_error = EFCE_DETECTED;
-      SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSE);
 		}
 	}
 	else {

+ 1 - 0
Firmware/ultralcd.cpp

@@ -1658,6 +1658,7 @@ void lcd_pause_print()
     {
         lcd_commands_type = LcdCommands::LongPause;
     }
+	SERIAL_PROTOCOLLNRPGM(MSG_OCTOPRINT_PAUSE); //pause for octoprint
 }