-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lay the ground work for a hardware abstraction layer (#15)
* Pull out OmoteUI into its own hpp/cpp that only controls UI/UX Added HardwareAbstractionInterface to allow UI to be decoupled Add OmoteUI class/Header to visual studio solution Bump the compiler to c++17 for std::clamp * code format update visual studio solution to build all versions properly Pull pin defs into config file use config file to allow USE_SIMULATOR checks in OmoteUI this will allow the sim to compile in specific code within the UI * put pin mode config into hardwarerevX class along with some other hardware things. Still lots of work to pull everything into the HAL. Change-Id: If3cacc43d43670b0ff2233140b1cff66a4aeb48d * pull Prefrences, IMU interrupt and sleep into the hardware class Change-Id: I082ae086ed70306789df80eafce8870a5cdfd125 * pull in touch screen, IMU and slow screen wake into hardware Change-Id: I61b49a6d0551463becbc3bdf1418ac9fde9d9376 * Pull wifi and IR into Hardware RevX pull last bit of global variables into hardware rev * un public everything * clean up simulator build * rename loop handler reorder setup to better match the origional main * Add Loop Handler that updates UI * Add images to their own file to shrink OmoteUI * Allow Wifi to be turned off with the macro * Update Battery Update Task instead of a time based check and update * Clean up abstract interface move defenitions out of hardwareRevX.hpp into cpp * reorder HardwareRevX functions * Add comment blocks to top of headers --------- Co-authored-by: Matthew Colvin <[email protected]> Co-authored-by: Matthew Colvin <[email protected]>
- Loading branch information
1 parent
be3a203
commit f1ff9ed
Showing
18 changed files
with
3,381 additions
and
1,991 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "HardwareSimulator.hpp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#pragma once | ||
#include "HardwareAbstractionInterface.h" | ||
#include <string> | ||
#include <iostream> | ||
|
||
class HardwareSimulator : | ||
public HardwareAbstractionInterface | ||
{ | ||
public: | ||
|
||
HardwareSimulator() = default; | ||
|
||
virtual void debugPrint(std::string message) override { | ||
std::cout << message; | ||
} | ||
|
||
virtual void sendIR() override { | ||
|
||
} | ||
|
||
virtual void MQTTPublish(const char* topic, const char* payload) override { | ||
|
||
}; | ||
|
||
virtual void init() override { | ||
lv_init(); | ||
} | ||
|
||
}; | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#pragma once | ||
|
||
#define IS_SIMULATOR true | ||
|
||
#define SCREEN_WIDTH 240 | ||
#define SCREEN_HEIGHT 360 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// OMOTE Hardware Abstraction | ||
// 2023 Matthew Colvin | ||
|
||
#pragma once | ||
#include <lvgl.h> | ||
#include <string> | ||
|
||
class HardwareAbstractionInterface { | ||
public: | ||
HardwareAbstractionInterface() = default; | ||
|
||
virtual void init() = 0; | ||
virtual void sendIR() = 0; | ||
virtual void MQTTPublish(const char *topic, const char *payload) = 0; | ||
virtual void debugPrint(std::string message) = 0; | ||
}; |
Oops, something went wrong.