浏览代码

Added link monitor to farm mode

michalprusa 8 年之前
父节点
当前提交
734ca2eb43
共有 3 个文件被更改,包括 19 次插入1 次删除
  1. 2 0
      Firmware/Marlin.h
  2. 6 1
      Firmware/Marlin_main.cpp
  3. 11 0
      Firmware/ultralcd_implementation_hitachi_HD44780.h

+ 2 - 0
Firmware/Marlin.h

@@ -284,6 +284,8 @@ extern unsigned long stoptime;
 extern bool is_usb_printing;
 extern unsigned int usb_printing_counter;
 
+extern unsigned long kicktime;
+
 extern unsigned long total_filament_used;
 void save_statistics(unsigned long _total_filament_used, unsigned long _total_print_time);
 extern unsigned int heating_status;

+ 6 - 1
Firmware/Marlin_main.cpp

@@ -255,6 +255,8 @@ int extruder_multiply[EXTRUDERS] = {100
 
 bool is_usb_printing = false;
 
+unsigned long kicktime = millis()+100000;
+
 unsigned int  usb_printing_counter;
 
 int lcd_change_fil_state = 0;
@@ -1679,7 +1681,10 @@ void process_commands()
       lcd_force_language_selection();
     } else if(code_seen("Lz")) {
       EEPROM_save_B(EEPROM_BABYSTEP_Z,0);
-    } 
+    } else if(code_seen("Beat")) {
+        // Kick farm link timer
+        kicktime = millis();
+    }
     //else if (code_seen('Cal')) {
 		//  lcd_calibration();
 	  // }

+ 11 - 0
Firmware/ultralcd_implementation_hitachi_HD44780.h

@@ -763,6 +763,17 @@ static void lcd_implementation_status_screen()
 		lcd_printPGM(PSTR(" F"));
 		lcd.print(farm_no);
 		lcd_printPGM(PSTR("  "));
+        
+        // Beat display
+        lcd.setCursor(LCD_WIDTH - 1, 0);
+        if ( (millis() - kicktime) < 60000 ) {
+        
+            lcd_printPGM(PSTR("L"));
+        
+        }else{
+            lcd_printPGM(PSTR(" "));
+        }
+        
 	}
 
     //Print time elapsed