Merge upstream changes from Marlin 2.1.1

This commit is contained in:
Stefan Kalscheuer
2022-09-03 09:23:32 +02:00
parent 626283aadb
commit 986e416c7f
1610 changed files with 73839 additions and 40857 deletions

View File

@@ -37,7 +37,9 @@ struct printStatistics { // 16 bytes
uint16_t finishedPrints; // Number of complete prints
uint32_t printTime; // Accumulated printing time
uint32_t longestPrint; // Longest successful print job
float filamentUsed; // Accumulated filament consumed in mm
#if HAS_EXTRUDERS
float filamentUsed; // Accumulated filament consumed in mm
#endif
#if SERVICE_INTERVAL_1 > 0
uint32_t nextService1; // Service intervals (or placeholders)
#endif
@@ -52,12 +54,7 @@ struct printStatistics { // 16 bytes
class PrintCounter: public Stopwatch {
private:
typedef Stopwatch super;
#if EITHER(USE_WIRED_EEPROM, CPU_32_BIT)
typedef uint32_t eeprom_address_t;
#else
typedef uint16_t eeprom_address_t;
#endif
typedef IF<EITHER(USE_WIRED_EEPROM, CPU_32_BIT), uint32_t, uint16_t>::type eeprom_address_t;
static printStatistics data;
@@ -112,7 +109,7 @@ class PrintCounter: public Stopwatch {
/**
* @brief Initialize the print counter
*/
static inline void init() {
static void init() {
super::init();
loadStats();
}
@@ -124,13 +121,15 @@ class PrintCounter: public Stopwatch {
*/
FORCE_INLINE static bool isLoaded() { return loaded; }
/**
* @brief Increment the total filament used
* @details The total filament used counter will be incremented by "amount".
*
* @param amount The amount of filament used in mm
*/
static void incFilamentUsed(float const &amount);
#if HAS_EXTRUDERS
/**
* @brief Increment the total filament used
* @details The total filament used counter will be incremented by "amount".
*
* @param amount The amount of filament used in mm
*/
static void incFilamentUsed(float const &amount);
#endif
/**
* @brief Reset the Print Statistics
@@ -176,8 +175,8 @@ class PrintCounter: public Stopwatch {
*/
static bool start();
static bool _stop(const bool completed);
static inline bool stop() { return _stop(true); }
static inline bool abort() { return _stop(false); }
static bool stop() { return _stop(true); }
static bool abort() { return _stop(false); }
static void reset();