Updates Stopwatch class to use internal state enum
This commit is contained in:
@ -28,12 +28,6 @@
|
||||
// Print debug messages with M111 S2 (Uses 156 bytes of PROGMEM)
|
||||
//#define DEBUG_STOPWATCH
|
||||
|
||||
enum StopwatchState {
|
||||
STOPWATCH_STOPPED,
|
||||
STOPWATCH_RUNNING,
|
||||
STOPWATCH_PAUSED
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Stopwatch class
|
||||
* @details This class acts as a timer proving stopwatch functionality including
|
||||
@ -41,7 +35,13 @@ enum StopwatchState {
|
||||
*/
|
||||
class Stopwatch {
|
||||
private:
|
||||
StopwatchState state;
|
||||
enum State {
|
||||
STOPPED,
|
||||
RUNNING,
|
||||
PAUSED
|
||||
};
|
||||
|
||||
Stopwatch::State state;
|
||||
millis_t accumulator;
|
||||
millis_t startTimestamp;
|
||||
millis_t stopTimestamp;
|
||||
|
Reference in New Issue
Block a user