From 739dcda0f1dd53124afc627f9e8d69c3b9e9c5e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Br=C3=A1zio?= Date: Mon, 25 Apr 2016 17:40:43 +0100 Subject: [PATCH] Renamed stopwatch::status to stopwatch::state --- Marlin/stopwatch.cpp | 12 ++++++------ Marlin/stopwatch.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/stopwatch.cpp b/Marlin/stopwatch.cpp index 60d556a4f..f871af1c7 100644 --- a/Marlin/stopwatch.cpp +++ b/Marlin/stopwatch.cpp @@ -34,7 +34,7 @@ void Stopwatch::stop() { if (!this->isRunning()) return; - this->status = STPWTCH_STOPPED; + this->state = STPWTCH_STOPPED; this->stopTimestamp = millis(); } @@ -45,7 +45,7 @@ void Stopwatch::pause() { if (!this->isRunning()) return; - this->status = STPWTCH_PAUSED; + this->state = STPWTCH_PAUSED; this->stopTimestamp = millis(); } @@ -59,7 +59,7 @@ void Stopwatch::start() { if (this->isPaused()) this->accumulator = this->duration(); else this->reset(); - this->status = STPWTCH_RUNNING; + this->state = STPWTCH_RUNNING; this->startTimestamp = millis(); } @@ -68,18 +68,18 @@ void Stopwatch::reset() { debug(PSTR("reset")); #endif - this->status = STPWTCH_STOPPED; + this->state = STPWTCH_STOPPED; this->startTimestamp = 0; this->stopTimestamp = 0; this->accumulator = 0; } bool Stopwatch::isRunning() { - return (this->status == STPWTCH_RUNNING) ? true : false; + return (this->state == STPWTCH_RUNNING) ? true : false; } bool Stopwatch::isPaused() { - return (this->status == STPWTCH_PAUSED) ? true : false; + return (this->state == STPWTCH_PAUSED) ? true : false; } uint16_t Stopwatch::duration() { diff --git a/Marlin/stopwatch.h b/Marlin/stopwatch.h index 53c0f149f..6ac69eacc 100644 --- a/Marlin/stopwatch.h +++ b/Marlin/stopwatch.h @@ -28,7 +28,7 @@ // Print debug messages with M111 S2 (Uses 156 bytes of PROGMEM) //#define DEBUG_STOPWATCH -enum StopwatchStatus { +enum StopwatchState { STPWTCH_STOPPED, STPWTCH_RUNNING, STPWTCH_PAUSED @@ -41,7 +41,7 @@ enum StopwatchStatus { */ class Stopwatch { private: - StopwatchStatus status; + StopwatchState state; uint16_t accumulator; uint32_t startTimestamp; uint32_t stopTimestamp;