Commit Graph

12 Commits

Author SHA1 Message Date
Reinhold Gschweicher
abed693a44 main: remove residual Apps::Missing instantiation
During development the Apps::Missing screen was used to indicate a
Screeen, that wasn't ported yet to the Simulator.
2022-03-07 22:19:49 +01:00
NeroBurner
816210023f
Merge pull request #9 from InfiniTimeOrg/fix_screen_off_double_free
main: fix double free of screen_off_bg lv_obj
2022-03-02 07:40:26 +01:00
Reinhold Gschweicher
8bc308b4e1 main: fix double free of screen_off_bg lv_obj
If the Alarm is set, then switch away from the Alarm Screen and turn off
display to get the "Screen is OFF" overlay. When the alarm rings the
Screen is switched to the Alarm Screen, which triggers the current
screen (for example the Clock/WatchFace) to issue an `lv_obj_clean()`
call. This call removes the `screen_off_bg` object, before the main
`refresh_sceen()` of the simulator can do it. Later the simulator tries
to remove the `screen_off_bg` object again, which is a double-free of
memory resulting in a segfault.

To prevent this segfault add a callback to the `screen_off_bg` callback
which informs the simulator, that the object has already been removed.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/8
2022-03-01 22:49:08 +01:00
Reinhold Gschweicher
2b8b4edba3 sim: NimbleController: add stubs for new En/DisableRadio() functions
New functions added in
ef44b763d9
for the airplane-mode
2022-02-26 21:37:21 +01:00
Reinhold Gschweicher
cdd66256ce lv_drv_conf: disable linux frame buffer socket 2022-02-26 21:37:21 +01:00
Reinhold Gschweicher
999888eaf8 add missing <string> and <cmath> includes 2022-02-26 21:37:21 +01:00
Reinhold Gschweicher
a79f75285f cmake: improve InfiniTime_DIR default
With the old default of just "InfiniTime" you have to have the working
directory in the `InfiniSim` directory. The new default makes the
default independent of the current working directory.
2022-02-20 22:27:10 +01:00
Reinhold Gschweicher
1b797211f1 main: fix segfault because of lv_task_handler() concurrently called
Both InfiniSim/main.cpp and SystemTask.cpp periodically called
`lv_task_handler()`. This introduces a race condition, which leads to a
segmentation fault in either the main or the SystemTasks call of
`lv_task_handler()`.

Now `main` only calls the `lv_task_handler()` if the `SystemTask` does
not (while the screen is turned off). We need this for the Simulator,
otherwise the "Screen is OFF" message won't appear, and the right mouse
button won't be recognized to wake up the simulated screen.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/3
2022-02-20 16:27:06 +01:00
Reinhold Gschweicher
db3144c4f9 main: one notification per notification category
Notifications store the title and the message in the same array,
separated by a `\0`. Add the notification category as title to the
notifications.

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Vitae aliquet nec ullamcorper sit amet.
Id aliquet risus feugiat in ante metus dictum at.
Ut porttitor leo a diam sollicitudin.
Ultrices tincidunt arcu non sodales neque sodales ut etiam sit.
Pellentesque dignissim enim sit amet.
Urna nec tincidunt praesent semper feugiat nibh sed pulvinar proin.
Tellus id interdum velit laoreet id donec ultrices tincidunt.
Viverra maecenas accumsan lacus vel facilisis volutpat est velit egestas.
Volutpat consequat mauris nunc congue.
2022-02-20 13:22:11 +01:00
Arthur Lutz
d548c711be [README] fix apt command 2022-02-18 22:52:06 +01:00
Reinhold Gschweicher
f19355949b Initial InfiniSim project 2022-02-17 22:57:08 +01:00
Reinhold Gschweicher
cea006b049 init 2022-02-16 21:19:37 +01:00