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