From c52ff17429506e1f28520606fc708c19fff08731 Mon Sep 17 00:00:00 2001 From: localhorst Date: Thu, 22 Nov 2018 22:40:46 +0100 Subject: [PATCH] added starttime to charger --- Software/src/charger.cpp | 6 ++++++ Software/src/charger.h | 3 +++ Software/src/openChargeMicro.h | 3 ++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Software/src/charger.cpp b/Software/src/charger.cpp index a29bb3f..7901117 100644 --- a/Software/src/charger.cpp +++ b/Software/src/charger.cpp @@ -37,6 +37,12 @@ double charger::getCapacity() { return 1.1; } +void charger::setStartTime(struct time_t pTime){ + startTime = pTime; +} + struct time_t charger::getStartTime(){ + return startTime; + } void charger::getInfo() { char buffer[50]; diff --git a/Software/src/charger.h b/Software/src/charger.h index 22a9fb9..0d1a59e 100644 --- a/Software/src/charger.h +++ b/Software/src/charger.h @@ -20,6 +20,7 @@ private: struct s_charger charger_settings; ioController io; multiplexer mux; + struct time_t startTime; bool active; public: @@ -28,6 +29,8 @@ public: double getCurrent(); double getVoltage(); double getCapacity(); + void setStartTime(struct time_t pTime); + struct time_t getStartTime(); void getInfo(); void setStatus(bool pBool); bool getStatus(); diff --git a/Software/src/openChargeMicro.h b/Software/src/openChargeMicro.h index 7ae1572..2fc8332 100644 --- a/Software/src/openChargeMicro.h +++ b/Software/src/openChargeMicro.h @@ -9,8 +9,9 @@ /* project header */ #include "ioController.h" #include "multiplexer.h" -#include "charger.h" #include "clock.h" +#include "charger.h" + /* Pins */ #define WS2812B PD2