Ver código fonte

Remove farm_no completely + reuse prusa_stat_farm_number() where
applicable

D.R.racer 3 anos atrás
pai
commit
514321f2ce
2 arquivos alterados com 4 adições e 13 exclusões
  1. 4 10
      Firmware/ultralcd.cpp
  2. 0 3
      Firmware/ultralcd.h

+ 4 - 10
Firmware/ultralcd.cpp

@@ -4110,10 +4110,9 @@ void prusa_statistics(int _message, uint8_t _fil_nr) {
 		farm_timer = 2;
 		break;
 	case 8:		// printer started
-		SERIAL_ECHOPGM("{[PRN:0][PFN:");
+		SERIAL_ECHOPGM("{[PRN:0]");
+		prusa_stat_farm_number();
 		status_number = 0;
-		SERIAL_ECHO(farm_no);
-		SERIAL_ECHO(']');
 		farm_timer = 2;
 		break;
 	case 20:		// echo farm no
@@ -4150,10 +4149,7 @@ void prusa_statistics(int _message, uint8_t _fil_nr) {
     case 99:		// heartbeat
         SERIAL_ECHOPGM("{[PRN:99]");
         prusa_stat_temperatures();
-		SERIAL_ECHOPGM("[PFN:");
-		SERIAL_ECHO(farm_no);
-		SERIAL_ECHO(']');
-            
+		prusa_stat_farm_number();
         break;
 	}
 	SERIAL_ECHOLN('}');	
@@ -4168,9 +4164,7 @@ static void prusa_stat_printerstatus(int _status)
 }
 
 static void prusa_stat_farm_number() {
-	SERIAL_ECHOPGM("[PFN:");
-	SERIAL_ECHO(farm_no);
-	SERIAL_ECHO(']');
+	SERIAL_ECHOPGM("[PFN:0]");
 }
 
 static void prusa_stat_diameter() {

+ 0 - 3
Firmware/ultralcd.h

@@ -47,7 +47,6 @@ void lcd_pause_print();
 void lcd_resume_print();
 void lcd_print_stop();
 void prusa_statistics(int _message, uint8_t _col_nr = 0);
-//void lcd_confirm_print();
 unsigned char lcd_choose_color();
 void lcd_load_filament_color_check();
 //void lcd_mylang();
@@ -127,8 +126,6 @@ extern CustomMsg custom_message_type;
 extern unsigned int custom_message_state;
 
 extern uint8_t farm_mode;
-// Farmers request removal of farm_no from the FW
-constexpr const int farm_no = 0;
 extern int farm_timer;
 extern uint8_t farm_status;