Add a new simulation key handler for weather data:
- 'w' will generate new weather, cycling through the various conditions
- 'W' will clear the weather data
Integrate the new `infinitime_apps` library and enable user applications
selection using the CMake variable `ENABLE_USERAPPS`.
Update InfiniTime to after CMake user app selection merged
* Integration of Simple Weather Service
Replace the old WeatherService by the new Simple Weather Service.=
* Update InfiniTime to after SimpleWeatherService got merged
---------
Co-authored-by: Reinhold Gschweicher <pyro4hell@gmail.com>
On rolling distros the usage of `libpng` submodule makes problems as the
`zlib` system dependency of said module gets updated. Then the submodule
regularly is too old to handle the updates `zlib` dependency.
Fix this maintenance churn by requiring `libpng` as system library as
well. Then the distros package manager keeps those versions in sync.
This unfortunately requires users to install a new runtime/build
dependency, but it still can be disabled with `-DWITH_PNG=OFF`.
The new analog watch face implementation in InfiniTime draws the background programmatically instead of using a background picture. This branch removes this background picture from the files needed by cmake to build the project.
Loading the file from disk introduces a slight dependency on the working
directory for the simulator. Prevent that by loading the bmp from
memory.
Use a python script to convert the backround bmp image to a C header
file. Include this header in `main.cpp` and load the bmp from memory.
Instead of drawing just circles use a background image to show status
symbols what the respective status means (not just the color of the
dots).
Furthermore draw a rectangle for the battery status instead of bubbles.
Since FreeRTOS.h, portmacro_cmsis.h and task.h are now built in C (by lv_mem.c), I had to change some includes and declarations to make them compatible with a C compiler.
Integrating the new memory management from InfiniTime in InfiniSim is not easy because InfiniSim does not include the whole FreeRTOS. Which means that, for example, pvPortMalloc() and vPortFree() are not accessible from InfiniSim.
As a first step, I provided custom implementations for pvPortMalloc(), vPortFree() which are based on ... malloc(). These function keep track of the memory that is currently allocated so that xPortGetFreeHeapSize(), xPortGetMinimumEverFreeHeapSize() return something.
Not that this implementation do not keep track of all the memory allocations done in InfiniTime. It can only "see" those done via pvPortMalloc(). It means that the available memory displayed by InfiniSim will probably be very optimistic.
Something must have changed, but now the MONITOR_ZOOM factor must be
considered when calling `SDL_RenderReadPixels`. Always calling with a
monitor width and height of 240 results in a segmentation fault in said
function.
Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/95
For me with vscode triggering a breakpoint during a mouse swipe event
handler freezes all interaction with the IDE.
As a workaround (and a nice way to play `Twos.h` :D ) map the direction
keys to the corresponding swipe events.
The Hrs3300.h driver can now be used directly from InfiniTime. Some
other improvement made that possible. One less simulator file, one less
file to keep updated. Win-Win (for me at least).