diff --git a/Platformio/HAL/Interface/HardwareInterface.cpp b/Platformio/HAL/Interface/HardwareInterface.cpp index 9c779b4..9283e92 100644 --- a/Platformio/HAL/Interface/HardwareInterface.cpp +++ b/Platformio/HAL/Interface/HardwareInterface.cpp @@ -1,13 +1,13 @@ #include "HardwareInterface.h" -HardwareInterface::HardwareInterface(std::shared_ptr aBattery) +HardwareAbstract::HardwareAbstract(std::shared_ptr aBattery) : mBattery(std::move(aBattery)){ } -std::optional HardwareInterface::getBatteryStatus(){ +std::optional HardwareAbstract::getBatteryStatus(){ if(mBattery){ - HardwareInterface::batteryStatus currentStatus; + HardwareAbstract::batteryStatus currentStatus; currentStatus.percentage = mBattery->getPercentage(); currentStatus.isCharging = mBattery->isCharging(); return currentStatus; diff --git a/Platformio/HAL/Interface/HardwareInterface.h b/Platformio/HAL/Interface/HardwareInterface.h index 7a065cc..601266e 100644 --- a/Platformio/HAL/Interface/HardwareInterface.h +++ b/Platformio/HAL/Interface/HardwareInterface.h @@ -8,7 +8,7 @@ #include #include "BatteryInterface.h" -class HardwareInterface { +class HardwareAbstract { public: struct batteryStatus { @@ -20,7 +20,7 @@ public: }; virtual std::optional getBatteryStatus(); - HardwareInterface(std::shared_ptr aBattery = nullptr); + HardwareAbstract(std::shared_ptr aBattery = nullptr); virtual void init() = 0; virtual void sendIR() = 0; diff --git a/Platformio/HAL/Targets/ESP32/HardwareRevX.cpp b/Platformio/HAL/Targets/ESP32/HardwareRevX.cpp index 6572534..f7fb8da 100644 --- a/Platformio/HAL/Targets/ESP32/HardwareRevX.cpp +++ b/Platformio/HAL/Targets/ESP32/HardwareRevX.cpp @@ -49,7 +49,7 @@ void HardwareRevX::initIO() { gpio_deep_sleep_hold_dis(); } -HardwareRevX::HardwareRevX():HardwareInterface(std::make_shared(ADC_BAT,CRG_STAT)){ +HardwareRevX::HardwareRevX():HardwareAbstract(std::make_shared(ADC_BAT,CRG_STAT)){ } diff --git a/Platformio/HAL/Targets/ESP32/HardwareRevX.hpp b/Platformio/HAL/Targets/ESP32/HardwareRevX.hpp index 42ccf06..a8d9003 100644 --- a/Platformio/HAL/Targets/ESP32/HardwareRevX.hpp +++ b/Platformio/HAL/Targets/ESP32/HardwareRevX.hpp @@ -21,7 +21,7 @@ #include "omoteconfig.h" -class HardwareRevX : public HardwareInterface { +class HardwareRevX : public HardwareAbstract { public: enum class WakeReason { RESET, IMU, KEYPAD }; @@ -33,7 +33,7 @@ public: } static std::weak_ptr getRefrence() { return getInstance(); } - // HardwareInterface + // HardwareAbstract virtual void init() override; virtual void sendIR() override; virtual void MQTTPublish(const char *topic, const char *payload) override; diff --git a/Platformio/HAL/Targets/Simulator/HardwareSimulator.hpp b/Platformio/HAL/Targets/Simulator/HardwareSimulator.hpp index 9c83967..55747fe 100644 --- a/Platformio/HAL/Targets/Simulator/HardwareSimulator.hpp +++ b/Platformio/HAL/Targets/Simulator/HardwareSimulator.hpp @@ -3,9 +3,9 @@ #include #include -class HardwareSimulator : public HardwareInterface { +class HardwareSimulator : public HardwareAbstract { public: - HardwareSimulator() : HardwareInterface(nullptr){}; + HardwareSimulator() : HardwareAbstract(nullptr){}; virtual void debugPrint(std::string message) override { std::cout << message; @@ -19,8 +19,8 @@ public: virtual void init() override; - virtual std::optional getBatteryStatus() override { - HardwareInterface::batteryStatus fakeStatus; + virtual std::optional getBatteryStatus() override { + HardwareAbstract::batteryStatus fakeStatus; fakeStatus.isCharging = false; fakeStatus.percentage = 100; return fakeStatus; diff --git a/Platformio/OmoteUI/OmoteUI.hpp b/Platformio/OmoteUI/OmoteUI.hpp index 6d207e7..9e8be0d 100644 --- a/Platformio/OmoteUI/OmoteUI.hpp +++ b/Platformio/OmoteUI/OmoteUI.hpp @@ -15,12 +15,12 @@ /// of resources. class OmoteUI { public: - OmoteUI(std::shared_ptr aHardware) + OmoteUI(std::shared_ptr aHardware) : mHardware(aHardware){}; static std::weak_ptr getRefrence() { return getInstance(); }; static std::shared_ptr - getInstance(std::shared_ptr aHardware = nullptr) { + getInstance(std::shared_ptr aHardware = nullptr) { if (mInstance) { return mInstance; } else if (aHardware) { @@ -54,7 +54,7 @@ public: private: static std::shared_ptr mInstance; - std::shared_ptr mHardware; + std::shared_ptr mHardware; lv_obj_t *panel = nullptr; Images imgs = Images();