- this app allow set time/date
- this app allow set system timezone
- this app allow connect watch to internet via privisioning with a official ESP32 provisionning app from espressif
- Notes: at this time, only WiFi provisioning is availiable
- Rotate whole screen
- Show battery health
- Enable disable features
- Set default screen brightness
- Week activity stats
- @TODO (more apps not listed here)
-
Duplicate files named: src/app/ApplicationBase.hpp & src/app/ApplicationBase.cpp set name at your discretion (recomended add "Application" at end)
-
Edit both files and change all references to "ApplicationBase" and change to "YourDesiredNameApplication"
-
your app is ready!
Include here #include "SomethingApplication.hpp" file on it
On the AllApps definition goes all MainMenu entries:
{"PUT YOUR APP NAME HERE",img_mainmenu_debug_bits, img_mainmenu_debug_height, img_mainmenu_debug_width, [](void *caller) { LaunchApplication(new MYAPPLICATION()); } },
and it's all... icons can be made with gimp (xbm format) img_mainmenu_debug_bits,img_mainmenu_debug_height and img_mainmenu_debug_width are inside a xbm file, create their own, with a max of 120x120px (isn't necesary to be squared,only at last 120px)
- Applications on lWatch are objects descendants from TemplateApplication or LunokIoTApplication
LunokIoTApplication is the base application (use it if don't want "back" button on your application)
TemplateApplication is a LunokIoTApplication with back button (recommended)
::Tick() method are called from System, the app must draw their interface here (canvas)
- return true means the UI has changed
- return false means no redraw needed
- Can use application->canvas to draw anything you need in your application using TFT_eSPI primitives or lunokIoT controls
- To draw a splash screen must draw your canvas before leave Application constructor, If no splash use a "Tick();" at end of constructor
- Notes about i2c usage in your application:
- you must acquire a system mutex named "I2cMutex"
- Porting code from arduino sketch:
- use app constructor call to run the setup contents of sketch
- use app Tick call to run the loop contens of the sketch
BaseType_t done = xSemaphoreTake(I2cMutex, LUNOKIOT_EVENT_FAST_TIME_TICKS);
if (pdTRUE != done) { ...recovercode... ; }
...normal use...
xSemaphoreGive(I2cMutex);