Adds filamentUsed and longestPrint stats to PrintCounter
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#define PRINTCOUNTER_H
|
||||
|
||||
#include "macros.h"
|
||||
#include "language.h"
|
||||
#include "stopwatch.h"
|
||||
#include <avr/eeprom.h>
|
||||
|
||||
@@ -35,8 +36,9 @@ struct printStatistics { // 13 bytes
|
||||
//const uint8_t magic; // Magic header, it will always be 0x16
|
||||
uint16_t totalPrints; // Number of prints
|
||||
uint16_t finishedPrints; // Number of complete prints
|
||||
millis_t printTime; // Total printing time
|
||||
millis_t longestPrint; // Longest print job - not in use
|
||||
uint32_t printTime; // Accumulated printing time
|
||||
uint32_t longestPrint; // Longest successfull print job
|
||||
double filamentUsed; // Accumulated filament consumed in mm
|
||||
};
|
||||
|
||||
class PrintCounter: public Stopwatch {
|
||||
@@ -105,6 +107,14 @@ class PrintCounter: public Stopwatch {
|
||||
*/
|
||||
bool isLoaded();
|
||||
|
||||
/**
|
||||
* @brief Increments the total filament used
|
||||
* @details The total filament used counter will be incremented by "amount".
|
||||
*
|
||||
* @param amount The amount of filament used in mm
|
||||
*/
|
||||
void incFilamentUsed(double const &amount);
|
||||
|
||||
/**
|
||||
* @brief Resets the Print Statistics
|
||||
* @details Resets the statistics to zero and saves them to EEPROM creating
|
||||
|
Reference in New Issue
Block a user