Commit graph

40 commits

Author SHA1 Message Date
Matthew Colvin
0796176a0e Add Getters and setters for X and Y values
had to make sure the getters properly calculated layout before retrieving values.

Add a Tab class to allow for better control of adding content into the tabs and managing the contents once its in there.

Use setting class to do a quick demo of the OnShow code abilities. This could be useful for things like settings pages that need to load up HW resources when they are shown but then can power them down when they are hidden.
2023-09-23 01:06:06 -05:00
Matthew Colvin
7c089e395a Add an Helper in UIElement that converts lvgl object into UIElements or children via a static cast.
Make Tabview a friend of Base Page to allow it to notify pages that they are hidden or showing.

Implement the notification in Tabview to allow pages to know they are showing.
2023-09-22 23:36:25 -05:00
Matthew Colvin
1cc65594a9 Added concept of Background Screen that allows for construction of pages before knowing the final parent.
This will allow for easy creation of "pages" that can be layed out internally and passed to different screens and cleaned up when screens are cleaned up by the screen manager

add set width and height to base elements that allow for easy resizing

Create a settings page and make it red.
Test adding 2 tabs with the Page

this currently does not do anything fantastic on simulator but it sets a strong foundation for managing multiple pages
2023-09-22 19:59:24 -05:00
MatthewColvin
7fd53ef2f8 switching computers so just commiting 2023-09-21 19:31:51 -05:00
MatthewColvin
f5b7b7bc5f Merge remote-tracking branch 'upstream/abstraction' into UIRefactor 2023-09-17 19:45:03 -05:00
Paul Hortiatis
59897369ec
Fixing settings in the abstraction branch (#39)
* Fixing settings

* updating the simulator
2023-09-17 12:14:39 +02:00
MatthewColvin
dfbfd7a6a8 Add visiblity API for UIElements
Add ability for Screen Manager to display screens
and retain others underneath in a stack fasion.
2023-09-16 21:43:07 -05:00
MatthewColvin
52cb2e7ce2 Add background color setter in UIElement
Use main to spawn refacoredBasic UI
Start using new screen manager and
screen concepts
2023-09-16 16:44:15 -05:00
MatthewColvin
6a4aa9a35c Add an elements IDs class to allow for a way to determine what an object is. 2023-09-16 16:14:24 -05:00
MatthewColvin
1458aa7992 clang format code 2023-09-16 15:34:16 -05:00
MatthewColvin
91d7c9fffc put old UI in UI::Basic namespace 2023-09-16 15:24:48 -05:00
MatthewColvin
f5ba2e9b84 Add base UIElement class and extend widget and screen 2023-09-16 15:13:23 -05:00
MatthewColvin
5cb4c1408d flushed out the Base screen and widget classes a bit more 2023-09-16 14:46:59 -05:00
MatthewColvin
64a868a907 rename UIAbstract to UIBase and extend basic UI from it 2023-09-16 14:19:12 -05:00
MatthewColvin
40052d31b7 add base classes for screens and widgets
along with screen manager to allow place to manage multiple screens
2023-09-16 13:07:14 -05:00
MatthewColvin
5c6008c491 Add UI abstract and move some files into a basic folder 2023-09-16 12:45:12 -05:00
MatthewColvin
d37a587c5c move task handler to UI class out of main 2023-09-16 12:36:33 -05:00
MatthewColvin
32c4230071 add poller to core folder 2023-09-16 12:31:18 -05:00
Matthew Colvin
6a78c4cfa1
Refine and implement hardware interface (#37) 2023-09-14 06:34:04 +02:00
MatthewColvin
11d4e8d7e5 Merge remote-tracking branch 'upstream/abstraction' into RefineAndImplementHardwareInterface 2023-09-09 22:38:48 -04:00
MatthewColvin
6747c40df3 Fix bug in Display fade code with mutexes 2023-09-09 21:47:36 -04:00
Matthew Colvin
b45de68ebb Add get brightness to the displayAbstract to allow
removal of backlight brightness stored in OmoteUI class
"implement" new getter function in sim and esp32.
2023-09-09 21:47:36 -04:00
Matthew Colvin
65162049b3 convert notification driven battery to lvgl timer based polling
using new poller class to simplify the battery interface and
downstream usages of battery.

tweaked poller destructor and remove the default constructor
in preference of using a unique pointer

convert simulator to use a std::thread for lvgl Tick api because
the SDL thread sleep was not true to time. (and is simplified the code...)
2023-09-09 21:47:36 -04:00
Matthew Colvin
ae7a7d6dab modified poller to have callable first in constructor 2023-09-09 21:47:36 -04:00
Matthew Colvin
f5f856ba63 add poller to simplify polling UI updates 2023-09-09 21:47:36 -04:00
Thomas Bittner
47ccc214a0 Added new queues for inter task communication 2023-09-09 21:47:36 -04:00
Matthew Colvin
628ae37b9d add fake battery Drain to simulator
Fake drain of a period of 3 minuets
2023-09-09 21:47:04 -04:00
Thomas Bittner
43a930d7a8 Updated simulator to support new wifi selection UI 2023-09-09 21:47:04 -04:00
Thomas Bittner
5cd4c6f379 Updated wifi handler to use general wifiHandlerInterface 2023-09-09 21:47:04 -04:00
Thomas Bittner
53fa7b7c87 Added wifi UI and change debug print function
* HardwareAbstract debug print function now uses VA_LIST
* Added wifi handling UI
* Notification items currently part of hardware abstract
2023-09-09 21:47:04 -04:00
Thomas Bittner
02d973f8b1 Updated user interface with wifi settings page 2023-09-09 21:47:04 -04:00
Thomas Bittner
b114e99338 Moved images functionality into seperate cpp file 2023-09-09 21:47:04 -04:00
Matthew Colvin
6268a28682 rough draft a callback inside HardwareAbstract
to show concept.
2023-09-09 21:45:58 -04:00
Matthew Colvin
a4e35a2219 remove IR and
mqtt functions from hardwareAbstraction
2023-09-09 21:44:47 -04:00
Matthew Colvin
a771c64c71 rename interface folder to HardwareInterfaces
rename HardwareInterface file to hardware
abstract.

update ini to reflect new file structure
2023-09-09 21:44:47 -04:00
Matthew Colvin
44b5d8cf14 rename HardwareInterface to HardwareAbstract in file 2023-09-09 21:44:47 -04:00
Max
b31f7e04bd Fixed screen height
- corrected the SCREEN_HEIGHT
- small graphical changes in OmoteUI to make it look like in the main branch
2023-09-09 21:44:47 -04:00
Matthew Colvin
834780ce83 lvgl simulator working. 2023-09-09 21:44:46 -04:00
Matthew Colvin
5b1228b167 Re work directory structure to support new architecture
Still need to get the Sim building
2023-09-09 21:44:46 -04:00
Matthew Colvin
7a9ee138db
Add platform io sim (#31)
* 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 <Max-MKA@web.de>
Co-authored-by: Matthew Colvin <Matthew.Colvin@garmin.com>
Co-authored-by: Matthew Colvin <35540398+Mc067415@users.noreply.github.com>
2023-08-12 00:16:48 +02:00