Jelajahi Sumber

Do not declare extern class in .cpp file, include appropriate header.

Marek Bel 5 tahun lalu
induk
melakukan
b4d4bfa667
3 mengubah file dengan 4 tambahan dan 2 penghapusan
  1. 3 0
      Firmware/Marlin.h
  2. 1 1
      Firmware/Marlin_main.cpp
  3. 0 1
      Firmware/lcd.cpp

+ 3 - 0
Firmware/Marlin.h

@@ -21,6 +21,7 @@
 #include "fastio.h"
 #include "Configuration.h"
 #include "pins.h"
+#include "Timer.h"
 
 #ifndef AT90USB
 #define  HardwareSerial_h // trick to disable the standard HWserial
@@ -367,6 +368,8 @@ extern uint16_t gcode_in_progress;
 
 extern bool wizard_active; //autoload temporarily disabled during wizard
 
+extern LongTimer safetyTimer;
+
 #define PRINT_PERCENT_DONE_INIT   0xff
 #define PRINTER_ACTIVE (IS_SD_PRINTING || is_usb_printing || isPrintPaused || (custom_message_type == CUSTOM_MSG_TYPE_TEMCAL) || saved_printing || (lcd_commands_type == LCD_COMMAND_V2_CAL) || card.paused || mmu_print_saved)
 

+ 1 - 1
Firmware/Marlin_main.cpp

@@ -204,7 +204,7 @@ unsigned long pause_time = 0;
 unsigned long start_pause_print = millis();
 unsigned long t_fan_rising_edge = millis();
 LongTimer safetyTimer;
-LongTimer crashDetTimer;
+static LongTimer crashDetTimer;
 
 //unsigned long load_filament_time;
 

+ 0 - 1
Firmware/lcd.cpp

@@ -768,7 +768,6 @@ void lcd_update_enable(uint8_t enabled)
 	}
 }
 
-extern LongTimer safetyTimer;
 void lcd_buttons_update(void)
 {
     static uint8_t lcd_long_press_active = 0;