-
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.
* Lower default SPI Clock Lowered the default SPI clock as some displays might show glitches with the SPI frequency set above 40MHz. * Added missing library components Added the missing library symbols, footprints and 3D-models. These are all in a project-specific library called "omoteLib" (#19) * Implement MQTT publish in HardwareRevX Change-Id: I7b6955a662716f83dd8daf34128a353efa26bf80 * add batteryStatus info and allow access to it through the interface. Change-Id: Ieb748b1478d532f52ffff9edc783de3cbcf9f303 * rename hardwareAbstractionInterface Change-Id: I39a9bcd7fc4d92b271a40a869faae7870d6d88a1 * rename HardwareAbstractionInterface files Change-Id: Ifb6a96c38da61cb80aabc6c929e392a2fc91cf29 * fixed a typo * Re work directory structure to support new architecture Still need to get the Sim building * lvgl simulator working. * put init code into HardwareSimulator Class * ensure all targets build remove unused assets.c add new github actions that reflect new simulator * clean up build defines by using platform.ini to override default lv_config. remove unneeded include directory. Change-Id: Id63baa80dae89977d239a539b5db9ff67266e1d6 * Fix ESP32 Windows build after battling escape characters. Add esp32 Windows target to Actions. * Fixed screen height - corrected the SCREEN_HEIGHT - small graphical changes in OmoteUI to make it look like in the main branch --------- Co-authored-by: Max <[email protected]> Co-authored-by: Matthew Colvin <[email protected]> Co-authored-by: Matthew Colvin <[email protected]>
- Loading branch information
1 parent
f1ff9ed
commit 7a9ee13
Showing
45 changed files
with
65,184 additions
and
1,946 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
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,29 @@ | ||
name: Windows Simulator Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-windows: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
update: true | ||
install: >- | ||
mingw-w64-x86_64-gcc | ||
mingw-w64-x86_64-SDL2 | ||
mingw-w64-x86_64-python | ||
python3-pip | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Platform IOCore | ||
run: pip install --upgrade platformio | ||
|
||
- name: Put MSYS2_MinGW64 on PATH | ||
# there is not yet an environment variable for this path from msys2/setup-msys2 | ||
run: echo "${{ runner.temp }}/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
|
||
- name: Build PlatformIO Project 64 bit sim | ||
working-directory: ./Platformio | ||
run: pio run --environment x64_sim |
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 |
---|---|---|
@@ -1,37 +1,28 @@ | ||
name: Simulator Build | ||
name: Ubuntu Simulator Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build-x64: | ||
|
||
runs-on: windows-latest | ||
build-ubuntu: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
- uses: actions/cache@v3 | ||
with: | ||
msbuild-architecture: x64 | ||
|
||
# You can test your matrix by printing the current dotnet version | ||
- name: Build | ||
working-directory: ./LVGL Simulator | ||
run: MSBuild.exe ./LVGL.Simulator.sln -target:Build /p:Platform="x64" | ||
|
||
build-x86: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
path: | | ||
~/.cache/pip | ||
~/.platformio/.cache | ||
key: ${{ runner.os }}-pio | ||
- uses: actions/setup-python@v4 | ||
with: | ||
msbuild-architecture: x86 | ||
python-version: "3.9" | ||
- name: Install PlatformIO Core | ||
run: pip install --upgrade platformio | ||
|
||
- name: Install SDL2 | ||
run : sudo apt-get update && sudo apt-get install -y libsdl2-dev | ||
|
||
- name: Build | ||
working-directory: ./LVGL Simulator | ||
run: MSBuild.exe ./LVGL.Simulator.sln -target:Build /p:Platform="x86" | ||
- name: Build PlatformIO Project 64 bit sim | ||
working-directory: ./Platformio | ||
run: pio run --environment x64_sim |
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 |
---|---|---|
@@ -1,30 +1,29 @@ | ||
#pragma once | ||
#include "HardwareAbstractionInterface.h" | ||
#include <string> | ||
#include "HardwareInterface.h" | ||
#include <iostream> | ||
#include <string> | ||
|
||
class HardwareSimulator : | ||
public HardwareAbstractionInterface | ||
{ | ||
public: | ||
|
||
HardwareSimulator() = default; | ||
class HardwareSimulator : public HardwareInterface { | ||
public: | ||
HardwareSimulator() = default; | ||
|
||
virtual void debugPrint(std::string message) override { | ||
std::cout << message; | ||
} | ||
virtual void debugPrint(std::string message) override { | ||
std::cout << message; | ||
} | ||
|
||
virtual void sendIR() override { | ||
|
||
} | ||
virtual void sendIR() override {} | ||
|
||
virtual void MQTTPublish(const char* topic, const char* payload) override { | ||
virtual void MQTTPublish(const char *topic, const char *payload) override{ | ||
|
||
}; | ||
}; | ||
|
||
virtual void init() override { | ||
lv_init(); | ||
} | ||
virtual void init() override { lv_init(); } | ||
|
||
virtual batteryStatus getBatteryPercentage() { | ||
batteryStatus fakeStatus; | ||
fakeStatus.isCharging = false; | ||
fakeStatus.percentage = 100; | ||
fakeStatus.voltage = 4200; | ||
return fakeStatus; | ||
} | ||
}; | ||
|
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
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
Oops, something went wrong.