Commit graph

192 commits

Author SHA1 Message Date
JF 0aead42fdf
navigation: Add is available (#1847)
Navigation app now needs 2 images to be loaded from the resources on the external filesystem. This PR adds an 'enabled' field to the Applications struct. This field is true for all applications expect for Navigation which calls Navigation::IsAvailable(). This methods returns true if the 2 files are available in the resources.

The application list disables the application (draws it in grey, disables the touch callback) if the enable flag is not set.
2023-09-02 19:43:39 +02:00
kieranc 94f41258d5
PineTimeStyle weather display (#1459)
Weather display for PineTimeStyle

Documentation : https://wiki.pine64.org/wiki/PineTimeStyle and https://wiki.pine64.org/wiki/Infinitime-Weather
2023-06-04 16:52:31 +02:00
Riku Isokoski 40f7e1c7be TimerController: Rename to Timer 2023-04-16 14:33:23 +00:00
Riku Isokoski 661ffbeb1e TimerController: Make TimerController reusable
TimerController instance was moved to DisplayApp.
2023-04-16 14:33:23 +00:00
Riku Isokoski 310ea81eec inactivity: Use LVGL inactivity timers
Replace custom FreeRTOS inactivity timers with LVGL inactivity timers.

DisplayApp: Trigger display activity on timer done.

inactivity: Add additional checks
The backlight could be turned on by RestoreBrightness() on ble connect
event.

inactivity: Trigger activity on screen switch

A notification timing out could put the watch to sleep immediately.
While this could be ideal behaviour, it was caused by delay in
processing the EnableSleeping event and pushing RestoreBrightness to
DisplayApp.
2023-03-18 01:15:33 +02:00
Jean-François Milants 9bbd2ddbc4 LVGL / FS : Initialize the LVGL FS driver in LittleVgl (instead of FS).
Previously, the LVGL driver for the filesystem was initialized in the class FS. However, since 6f942e2, the order of the initializations was incorrect  : the driver was initialized (FS::LVGLFileSystemInit()) before LVGL (LittleVgl.Init()), which means that the driver registration was probably dropped when LVGL was initialized.

The LVGL driver is now initialized in LittleVgl.Init(), which seems to make much more sense, since all LVGL drivers are initialized there. This way, we ensure that the initialization of the drivers is consistent.
2023-02-26 22:10:03 +02:00
Riku Isokoski a5eac74fb5 motion: Disable Motion app
This is a debugging app, not useful for most people.
Also remove the app icon.
2023-02-25 18:06:37 +02:00
Riku Isokoski eccea5ab9f SystemTask: Move lcd to DisplayApp
SystemTask should never write to the lcd
2023-02-25 16:58:31 +02:00
Riku Isokoski 6f942e20ed LittleVgl: Instantiate in DisplayApp
LVGL is only a part of the main DisplayApp. Other "DisplayApps" can be
implemented without LVGL.

DummyLittleVgl isn't needed anymore and has been removed
2023-02-25 16:58:10 +02:00
Riku Isokoski ff34cf196e watchdog: Replace WatchdogView with const Watchdog 2023-02-25 16:57:12 +02:00
Riku Isokoski 26478d9006 screens: Remove unused DisplayApp parameters 2023-02-25 16:56:03 +02:00
Riku Isokoski 5ab255b26b SystemTask: Move MotorController to DisplayApp
Vibrations should be associated with something happening on the UI.
Therefore SystemTask should not be controlling the motor.
2023-02-25 12:15:00 +02:00
Riku Isokoski 255b07094b displayapp: Make Ble references const 2023-02-24 17:41:41 +02:00
Riku Isokoski 76f07de64b displayapp: Make Cst816S references const 2023-02-24 17:41:41 +02:00
Riku Isokoski 1c4b97382a displayapp: Make Battery class references const 2023-02-24 17:41:41 +02:00
Riku Isokoski 7066ff5aba touchhandler: Remove LVGL dependency
Move LVGL specific code to the LittleVgl class
2023-02-24 00:05:21 +02:00
John Quigley a7f8b59bfb
Combine Date and Time Settings (#1465)
Replace separate SettingSetDate and SettingSetTime with a combined screenlist.
Add DotIndicators. Similar to PageIndicator, but for use when separating screens instead of pages of a list.

Co-authored-by: Riku Isokoski <riksu9000@gmail.com>
2023-01-14 21:50:21 +02:00
Riku Isokoski fb19c491b6 Fix returning to the same screen 2023-01-05 15:13:05 +01:00
Riku Isokoski 5ef3c0d3be Implement a return app stack
Each opened app (screen) is pushed on a stack, which is then popped from
when returning instead of hard coded "previous apps". Return swipe and
refresh directions are automatically determined from the app transition.
2023-01-05 15:13:05 +01:00
Finlay Davidson eda96ffadc Update clang-{format,tidy} to 14
Also add configuration options only available in 13 and 14.
Fixes warning about -fstack-usage in clang-tidy check.
2023-01-04 17:15:33 +01:00
Riku Isokoski afea7ca0d1
Update clang-tidy configuration and fix some warnings (#1474)
Don't enable coding conventions from unrelated projects. Only enable
generic checks.
2022-12-18 18:14:36 +01:00
Jean-François Milants eb0af22ecf Watch face settings : disable watch faces that are not available (external resources are not installed). 2022-10-11 21:36:31 +02:00
Riku Isokoski 964f065de4 Fix clang-tidy warnings 2022-10-10 17:52:36 +02:00
Jean-François Milants c9b1fb8244 Brightness management in DisplayApp : do not allow the brightness level OFF when loading app and going to running mode. Such issue could occur in case of inconsistent or corrupted settings. 2022-10-02 18:04:09 +02:00
Jean-François Milants 58bb0e77db Fix formatting 2022-09-11 20:18:01 +02:00
Jean-François Milants 4cf73fc169 Infineat : Add support for external resources, and read the images and fonts from the ilesystem 2022-09-11 16:22:28 +02:00
Riku Isokoski 97048121b0 Use Counter widget in Alarm 2022-08-02 22:51:04 +02:00
Riku Isokoski edba1d9ccf Add status icons widget 2022-08-02 22:49:12 +02:00
Riku Isokoski 9ee1160578
Reset timer by long pressing on the button (#1214)
* Reset timer by long pressing on the button

* Consider press_lost as released

Otherwise the bar would keep increasing if the finger slid off the
button
2022-07-21 22:53:36 +03:00
Riku Isokoski cea81fea9c
Always restore brightness on app switch (#1213) 2022-07-21 22:16:55 +03:00
Riku Isokoski 95ff285991
Remove backup brightness feature (#1180)
This feature is not needed and is probably more likely to cause issues. It's better to just use brightnessController.Set(settingsController.GetBrightness());
2022-06-18 12:54:41 +03:00
mabuch 91a3e98276
remove unused Meter.cpp and Meter.h (#1171) 2022-06-05 19:35:33 +02:00
mabuch 8a71f2b9e0
remove unused Brightness App (#1170) 2022-06-05 19:34:37 +02:00
Finlay Davidson 7f45538eb5 Apply clang-format to all C++ files 2022-06-05 09:15:46 +03:00
Riku Isokoski 6dac0a62f4 Remove lcd from DisplayApp 2022-05-08 13:12:37 +02:00
Reinhold Gschweicher 2607c3d799 Let TouchHandler return TouchEvents instead of driver specific enum
Let the TouchHandler::GestureGet() function return a TouchEvent instead
of the touchpanel-driver specific enum.

This helps to move the driver specific helper function `ConvertGesture`
from `DisplayApp` into `TouchHandler`.
2022-04-13 21:33:58 +02:00
Riku Isokoski 78365548f7 Replace airplane mode with a bluetooth toggle 2022-04-02 16:16:47 +02:00
Jean-François Milants 8f436e1d74 Timer App : add background label to ensure that the app will be displayed correctly after a full refresh (HW scrolling transition).
Code cleaning and rename methods.
2022-03-28 21:12:46 +02:00
Jean-François Milants 4761fcb63a DisplayApp : Call the event handler of the current app before loading the new one. This way, we ensure that lv_task_handler() is called before sending event to the newly loaded app. 2022-03-28 21:12:25 +02:00
Jean-François Milants ef44b763d9 Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
Apply a few changes that were requested in the PR during the review.

# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/Messages.h
#	src/displayapp/screens/settings/Settings.cpp
2022-02-20 15:40:49 +01:00
Jean-François Milants 40cdb54772 Merge branch 'airplane-mode' of https://github.com/evergreen22/InfiniTime into evergreen22-airplane-mode
# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/Messages.h
#	src/displayapp/screens/settings/Settings.cpp
2022-02-20 15:25:24 +01:00
Reinhold Gschweicher 407908686a Provide reference to BrightnessController in DisplayApp
For the simulator I need a way to get to the brightnessController object
and handle the set brightness-levels accoringly.

This is done by the constructor expecting a brightnessController object
instead of initializing one itself
2022-02-19 20:46:45 +01:00
Riku Isokoski 4f649a8544 Improved alarm alert handling 2022-02-13 11:36:51 +01:00
Eli Weiss 2daa5dcbee Added alarm 12 hour interface 2022-01-31 20:42:48 +01:00
Eli Weiss 698288d822 Added 12 hour set time 2022-01-31 20:42:18 +01:00
JF 458f5b8eb8
Merge pull request #903 from Riksu9000/improved_notif_timeout
Improved notification timeout
2022-01-26 21:38:07 +01:00
Jean-François Milants bef3e708f6 Merge branch 'ShakeWake' of https://github.com/geekbozu/InfiniTime into geekbozu-ShakeWake
# Conflicts:
#	src/CMakeLists.txt
#	src/displayapp/Apps.h
#	src/displayapp/DisplayApp.cpp
#	src/displayapp/screens/settings/Settings.cpp
2022-01-04 21:48:08 +01:00
Tim Keller d2510d7926 Better Sensitivity UI, Calibration button added 2022-01-04 02:00:02 +00:00
Tim Keller 3ebf002f9d Add start of settings app for senstivity.
really just debugging. I want to make it more configurable then high med low.
Position of setting needs a new location...dynamicly adding it currently at the end. Which honestly im fine with.
2022-01-04 01:59:01 +00:00
SteveAmor 7a0f72ed8b resolve conflicts 2022-01-02 22:33:23 +00:00