From 35de08d2e37a8f28f933070dde834c4030a9abb8 Mon Sep 17 00:00:00 2001 From: Matthew Colvin <35540398+Mc067415@users.noreply.github.com> Date: Fri, 11 Aug 2023 23:33:41 -0500 Subject: [PATCH] add display interface to HardwareAbstract --- Platformio/HAL/HardwareAbstract.cpp | 6 ++++-- Platformio/HAL/HardwareAbstract.hpp | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Platformio/HAL/HardwareAbstract.cpp b/Platformio/HAL/HardwareAbstract.cpp index 68caaae..13c1adb 100644 --- a/Platformio/HAL/HardwareAbstract.cpp +++ b/Platformio/HAL/HardwareAbstract.cpp @@ -2,10 +2,12 @@ HardwareAbstract::HardwareAbstract( std::shared_ptr aBattery, - std::shared_ptr aWifiHandler + std::shared_ptr aWifiHandler, + std::shared_ptr aDisplay ) : mBattery(std::move(aBattery)), - mWifiHandler(std::move(aWifiHandler)) + mWifiHandler(std::move(aWifiHandler)), + mDisplay(std::move(aDisplay)) {} std::optional HardwareAbstract::getBatteryStatus(){ diff --git a/Platformio/HAL/HardwareAbstract.hpp b/Platformio/HAL/HardwareAbstract.hpp index 3e1971f..95cb070 100644 --- a/Platformio/HAL/HardwareAbstract.hpp +++ b/Platformio/HAL/HardwareAbstract.hpp @@ -7,6 +7,7 @@ #include #include #include "BatteryInterface.h" +#include "DisplayInterface.h" #include "wifiHandlerInterface.h" class HardwareAbstract { @@ -22,7 +23,8 @@ public: virtual std::optional getBatteryStatus(); HardwareAbstract(std::shared_ptr aBattery = nullptr, - std::shared_ptr aWifiHandler = nullptr + std::shared_ptr aWifiHandler = nullptr, + std::shared_ptr aDisplay = nullptr ); /// @brief Override in order to do setup of hardware devices @@ -35,4 +37,5 @@ public: private: std::shared_ptr mBattery; std::shared_ptr mWifiHandler; + std::shared_ptr mDisplay; };