Commit Graph
100 Commits
Author SHA1 Message Date
NeroBurner 8b22bcd1cd Merge pull request #138 from vkareh/generate-weather-data
SimpleWeatherService: Generate random weather data
2024-02-10 20:05:22 +01:00
NeroBurner fc8077add8 CI: install python3-pil for lv_img_conv.py (#126)
Install new build dependency introduced with move to minimum python
implementation of `lv_img_conv` node js script
https://github.com/InfiniTimeOrg/InfiniTime/pull/1863
2023-10-26 23:20:58 +02:00
NeroBurner 02f2cc5a05 Node v14 required for lv_font_conv (#122)
* Update miminum node version to v14+ as lv_font_conv minimum

The current readme of the `lv_font_conv` the minimum node.js version is
v14+. Update our readme to mention that minimum version as well.

https://github.com/lvgl/lv_font_conv#install-the-script

---

In Check node version and issue a warning if less than v14.0.0.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/109
2023-09-17 20:54:59 +02:00
NeroBurner ae2cd08965 Merge pull request #119 from InfiniTimeOrg/libpng_system_lib
Remove libpng submodule and require system lib
2023-09-11 19:48:21 +02:00
Reinhold Gschweicher f4b729e00b Remove libpng submodule and require system lib
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`.
2023-09-07 19:06:56 +02:00
NeroBurner 3ae396c0a6 Merge pull request #118 from FintasticMan/fix_lower_sleep
lowersleep: Fix InfiniSim build
2023-08-30 13:31:21 +02:00
NeroBurner 0dd9c5e84d Merge pull request #117 from FintasticMan/fix_raise_wake
raisewake: Fix for new raise to wake impl
2023-08-20 20:48:13 +02:00
NeroBurner 6256ec8284 Merge pull request #115 from InfiniTimeOrg/new-analog-watchface
Fix for the new analog watch face implementation in InfiniTime
2023-08-15 18:08:29 +02:00
Reinhold Gschweicher 25ec7af440 Update InfiniTime submodule to v1.13.0 release 2023-06-27 19:33:26 +02:00
NeroBurner 53b392a7a5 Merge pull request #108 from baltevl/main
main: add missing argument in lcd driver constructor call.
2023-06-12 23:44:18 +02:00
NeroBurner e6dcf3f743 Merge pull request #97 from InfiniTimeOrg/heap-unification
Integrate the new heap implementation from InfiniTime
2023-05-18 20:32:33 +02:00
NeroBurner 80cacdd97a Merge pull request #91 from Brod8362/simdisplay
Improve UI for the status window
2023-05-10 16:04:58 +02:00
Reinhold Gschweicher aa34f93161 sim: embedd background bmp and load from memory
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.
2023-05-08 18:32:50 +02:00
Reinhold Gschweicher d67a74dd15 FreeRTOS: use more specific std::algorithm instead of std::foreach 2023-05-03 22:39:40 +02:00
Reinhold Gschweicher c2488a2d28 FreeRTOS: use unordered_map as it has better runtime for access 2023-05-03 22:39:40 +02:00
Reinhold Gschweicher 310dc029a0 main: access minimumEverFreeHeap only when needed 2023-05-03 22:39:40 +02:00
Reinhold Gschweicher 7c2ea617f9 sim: mark header that need to be as C header 2023-05-03 22:39:40 +02:00
NeroBurner e416f2cf74 Merge pull request #106 from InfiniTimeOrg/swipe_segfault_with_zoom
Handle MONITOR_ZOOM for screen transitions and captures
2023-05-03 22:39:05 +02:00
Reinhold Gschweicher 8753661845 Handle MONITOR_ZOOM for screen transitions and captures
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
2023-05-03 22:36:25 +02:00
NeroBurner e9a42c8638 Merge pull request #105 from InfiniTimeOrg/arrow_keys_for_swiping
main: add swipe direction keys to make debugging easier
2023-05-03 22:36:11 +02:00
Reinhold Gschweicher 4f54e7bb7f main: add swipe direction keys to make debugging easier
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.
2023-05-03 22:33:39 +02:00
NeroBurner fb2202b199 Merge pull request #104 from InfiniTimeOrg/drivers_Hrs3300_no_sim
use drivers/Hrs3300.h from InfiniTime
2023-05-03 21:19:52 +02:00
Reinhold Gschweicher 2e746ea560 use drivers/Hrs3300.h from InfiniTime
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).
2023-05-03 21:16:30 +02:00
NeroBurner 83331a07ed Merge pull request #103 from InfiniTimeOrg/watchdog_no_sim
Use InfiniTime Watchdog.h by providing mdk/nrf.h and others
2023-05-03 21:14:39 +02:00
Reinhold Gschweicher 4b0c2dc3eb Use InfiniTime Watchdog.h by providing mdk/nrf.h and others 2023-05-03 20:59:58 +02:00
NeroBurner beea678fce Merge pull request #102 from InfiniTimeOrg/support_Watchdog_restructure
sim: support upstream Watchdog driver improvement
2023-05-01 22:03:59 +02:00
Reinhold Gschweicher 7613571f96 sim: support upstream Watchdog driver improvement
Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/101
2023-05-01 21:44:29 +02:00
NeroBurner 22c02bace6 Merge pull request #79 from minacode/watch-face-enum
Support for PR: https://github.com/InfiniTimeOrg/InfiniTime/pull/1339
2023-05-01 21:15:43 +02:00
NeroBurner 512f25157b Merge pull request #100 from InfiniTimeOrg/TimerController_to_Timer
Support TimerController rename to Timer
2023-05-01 21:04:45 +02:00
Reinhold Gschweicher 6541af6170 Support TimerController rename to Timer
Improvement done in https://github.com/InfiniTimeOrg/InfiniTime/pull/1650
2023-05-01 20:58:27 +02:00
Reinhold Gschweicher 0c63acd8c0 Update InfiniTime to 1.12.0 release 2023-05-01 19:46:49 +02:00
NeroBurner 65f3d3fdb9 Merge pull request #93 from FintasticMan/fix_cleaned_up_motioncontroller
motioncontroller: Fix changes in InfiniTime#1659
2023-03-12 22:14:28 +01:00
Reinhold Gschweicher 32fada34f4 Support rename of TimerController to FreeRTOS::Timer 2023-03-02 22:33:05 +01:00
NeroBurner 191bb9a59b Merge pull request #90 from Riksu9000/fix-lvgl
Remove LVGL instance in main
2023-02-27 19:02:19 +01:00
Reinhold Gschweicher 02f980f278 sim: LittleVgl: update s.t. LVGL-FS driver is initialized by LittleVgl
InfiniTime moved the LVGL-FS driver initialization to the LittleVgl
constructor and passed the FS member to do that.

Update the simulator copy of LittleVgl to do just that.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/89
2023-02-26 23:42:03 +01:00
Reinhold Gschweicher 44452ccdf6 sim: LittleVgl: remove touchPanel from constructor as done upstream
InfiniTime removed the `Pinetime::Drivers::Cst816S& touchPanel`
reference from the LittleVGL constructor. Update that in the simulator
to stay compatible
2023-02-26 23:11:00 +01:00
Reinhold Gschweicher 3a0ee34be5 main: updated to changed DisplayApp and SystemTask constructors
The constructors got cleaned up and the WatchdogView got replaced by a
const reference to the Watchdog object.

Update develop branch to the `infineat: Create colors at compile time`
commit, where those changes are needed
2023-02-26 23:00:52 +01:00
Reinhold Gschweicher 36c69bbc2e main: use ctime put_time to replace date/date.h include
Implementation referenced from:
https://stackoverflow.com/questions/17223096/outputting-date-and-time-in-c-using-stdchrono

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/88
2023-02-26 22:44:15 +01:00
Reinhold Gschweicher f457925952 sim: WeatherService: add missing algorithm include 2023-02-26 21:46:42 +01:00
NeroBurner 35aca7323d Merge pull request #87 from Riksu9000/remove-unused-files
Remove unused files
2023-02-25 19:18:04 +01:00
NeroBurner 6ccca0caf1 Merge pull request #86 from Riksu9000/infinitime-changes
Fix build after InfiniTime changes
2023-02-25 18:02:52 +01:00
NeroBurner df7f4bd813 Merge pull request #83 from devnoname120/cmake-explicit-std-filesystem-linking
cmake: add explicit std::filesystem linking

g++8 compiler has C++17 support, but needs a link parameter for `std::filesystem` to work.
Add a cmake-module to find the needed link flag (if any) and provide a CMake target to
link against.

This can be removed once InfiniTime needs a newer compiler standard (like C++20).

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/57
2023-01-19 07:44:59 +01:00
Reinhold Gschweicher 168ff53cb4 Merge branch 'combine_datetime' 2023-01-15 22:41:07 +01:00
Reinhold Gschweicher 45500e8f32 InfiniTime: Update for Combined Date and Time Settings
Update to develop branch after https://github.com/InfiniTimeOrg/InfiniTime/pull/1465
got merged.
2023-01-15 22:39:46 +01:00
NeroBurner 63bfd6e49e Merge pull request #77 from faxe1008/fix-gif-output
GifExporter: Disable dithering fixing artifacts in recording

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/51
2022-11-21 20:15:59 +01:00
NeroBurner 7cc4876066 Merge pull request #76 from 1sra3l/patch-1
s/scren/screen/ README.md
2022-11-12 17:08:00 +01:00
Reinhold Gschweicher e4a3aa0cc4 Update InfiniTime to current develop v1.11.0 branch 2022-10-16 16:10:10 +02:00
Reinhold Gschweicher 00ae5fc2d7 Update InfiniTime to 1.11.0 release 2022-10-16 16:10:10 +02:00
NeroBurner 02b75a8d3e Merge pull request #71 from minacode/low-battery
Add support for low battery warning
2022-10-12 21:23:40 +02:00
NeroBurner 535ed3cbdb Merge pull request #70 from InfiniTimeOrg/build_resources_option
Add option BUILD_RESOURCES=ON to build resources for sim
2022-10-11 22:51:49 +02:00
Reinhold Gschweicher 51f6de612a Add option BUILD_RESOURCES=ON to build resources.zip file
The `BUILD_RESOURCES` option is also available in `InfiniTime`, but we
don't want to require building the firmware to test `resource.zip` file
generation.
2022-10-11 22:31:14 +02:00
Reinhold Gschweicher 945693db93 Merge branch 'tgc-dk_new-notifi-msg' 2022-09-27 23:39:44 +02:00
Reinhold Gschweicher c6b1f0f74b sim: wake up screen (delete label) when screen off on new Notification
Get the system into the running state again, when the `n` button is
pressed for a new notification. Otherwise the simulation freezes
2022-09-27 23:37:45 +02:00
NeroBurner 2cfd22c856 Merge pull request #69 from InfiniTimeOrg/displayapp-needs-fs
DisplayApp now takes the filesystem as ctor arguments
2022-09-27 23:10:39 +02:00
Reinhold Gschweicher 17abf385f6 Update InfiniTime submodule with InfiNeat watchface PR
Update the submodule to the version just after
https://github.com/InfiniTimeOrg/InfiniTime/pull/1024 is merged.
2022-09-27 23:05:07 +02:00
NeroBurner 8460a5207a sim: change brightness only when screen is on (#66)
Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/45
2022-09-18 21:46:49 +02:00
NeroBurner 3d52e4a826 Update libpng to v1.6.38 with libm cmake fix (#65) 2022-09-17 16:08:33 +02:00
NeroBurner 23bf37995c Merge pull request #60 from InfiniTimeOrg/littlefs-do_install_ressource
littlefs-do: unzip in memory and copy listed resources to SPI raw file
2022-09-08 20:14:15 +02:00
Reinhold Gschweicher 2306807a73 littlefs-do: unzip in memory and copy listed resources to SPI raw file
Add a new command `littlefs-do res load resource.zip` which loads
resources from a zip file to the SPI raw file.

Below an example `resource.zip` is loaded:

```sh
$ ./littlefs-do res load infinitime-resources-1.10.0.zip --verbose
Calling FS::Init()
running 'res'
running 'res load'
loading resource file: "infinitime-resources-1.10.0.zip"
zip: num of files in zip: 8
copy file teko.bin                  from zip to SPI path '/teko.bin'
copy file lv_font_dots_40.bin       from zip to SPI path '/lv_font_dots_40.bin'
copy file 7segments_40.bin          from zip to SPI path '/7segments_40.bin'
copy file bebas.bin                 from zip to SPI path '/bebas.bin'
copy file 7segments_115.bin         from zip to SPI path '/7segments_115.bin'
copy file matrix.bin                from zip to SPI path '/matrix.bin'
copy file infineat-1.bin            from zip to SPI path '/infineat-1.bin'
finished: zip file fully loaded into SPI memory: infinitime-resources-1.10.0.zip
```

Afterwards the files are listed in the SPI raw file:

```sh
$ ./littlefs-do ls
type: DIR
name: /
type: DIR name: .
type: DIR name: ..
type: REG size: 4928 name: 7segments\_115.bin
type: REG size: 760 name: 7segments\_40.bin
type: REG size: 4420 name: bebas.bin
type: REG size: 1430 name: infineat-1.bin
type: REG size: 1840 name: lv\_font\_dots\_40.bin
type: REG size: 115204 name: matrix.bin
type: REG size: 440 name: teko.bin
```

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/55
2022-09-08 20:02:48 +02:00
Reinhold Gschweicher 4dea63843e external: add nlohmann_json v3.11.2
Single header downloaded from https://github.com/nlohmann/json/releases/tag/v3.11.2

Add a custom CMakeLists.txt to have a `nlohmann_json::nlohmann_json`
target to link against (just like the full project)
2022-09-06 21:34:55 +02:00
Reinhold Gschweicher 9841601106 external: add miniz v2.2.0 with self written CMakeLists.txt
Sources downloaded from https://github.com/richgel999/miniz/releases/tag/2.2.0
2022-09-06 21:34:44 +02:00
NeroBurner 6e423c9a48 Update Notification::On/Off enum rename (#59)
In https://github.com/InfiniTimeOrg/InfiniTime/pull/1261 the enums for
Notification ON/OFF were renamed to On/Off and the additional entry
`Sleep` was added.

Update `littlefs-do` to this change.
2022-09-05 22:54:25 +02:00
Reinhold Gschweicher 25ce4b20a3 README: get sources before lv_font_conv install
The build dependencies section says to install `lv_font_conv` to the
source directory. But the instructions to download the InfiniSim sources
was after the build dependencies.

Move the "get sources" section before the "build dependencies" to
clairify the instructions.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/53
2022-09-05 21:12:41 +02:00
NeroBurner 9e15182af2 littlefs-do binary to work with spi raw file (#52)
Add helper to modify spi raw file, to make experimenting with it easier.

```sh
$ ./littlefs-do --help
Usage: ./littlefs-do <command> [options]
Commands:
  -h, --help           show this help message for the selected command and exit
  -v, --verbose        print status messages to the console
  stat                 show information of specified file or directory
  ls                   list available files in 'spiNorFlash.raw' file
  mkdir                create directory
  rmdir                remove directory
  rm                   remove directory or file
  cp                   copy files into or out of flash file
  settings             list settings from 'settings.h'
```

In the process restructure the CMake file for less duplicate
includes/defines for both executables (`infinisim` and `littlefs-do`).

Upload the `littlefs-do` binary built by the CI additionally to the `infinisim` binary.
Use the updated upload-artifact@v3 template to do that.
2022-08-29 12:05:21 +02:00
Reinhold Gschweicher 741db4ea32 main: add index to notification message 2022-08-21 18:36:35 +02:00
NeroBurner b00dceb8c6 Support "Centralize most color definitions" (#50)
Support changes in InfiniTimeOrg/InfiniTime#1258

The file `lv_pinetime_theme.c` is renamed to `InfiniTimeTheme.cpp`.
Need to pick up that change in the simulator to compile with the new cpp
file if it exists.

Furthermore use the new `InfiniTimeTheme.h` header in simulator files.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/49
2022-08-15 13:46:42 +02:00
Reinhold Gschweicher 8861b98d04 Update InfiniTime to current develop v1.10.0 branch 2022-08-04 15:45:54 +02:00
Reinhold Gschweicher dfe72235bf Update InfiniTime to 1.10.0 release 2022-08-04 15:45:09 +02:00
Reinhold Gschweicher 935bb175b1 cmake: support date submodule include dir
Support both the current modified `date/includes` directory and the
`date` submodules `date/include` directory.

Once https://github.com/InfiniTimeOrg/InfiniTime/pull/1183 is merged
and the InfiniTime submodule is checked in also update the GitHub Action
and the AUR package.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/42
2022-06-26 22:15:09 +02:00
Reinhold Gschweicher a594446ef0 Add gif-h helper to create screen capture
Press key `I` (shift+`i`) to start a screen capture creating a gif with
the captured screen. Hit `I` again to stop the screen recording.

---

Add gif-h helper header only library

Copied from https://github.com/charlietangora/gif-h

https://github.com/charlietangora/gif-h/commit/3d2657b9ad40aac9fd6f75ad079335856e94d664
2022-06-19 22:31:25 +02:00
Reinhold Gschweicher ae9a020126 Update InfiniTime submodule to current develop 2022-06-18 08:26:40 +02:00
Reinhold Gschweicher 04c923bd82 LittleVgl: implement screen transitions like on PineTime
Move lvgl display init from main.cpp into LittleVgl.cpp to be closer to
InfiniTime, where display initialization is also done in LitteVgl.cpp.

Enable the original FlushDisplay code to get the screen
transition animations like on the real PineTime.

Also slow down the rendering, to actually be able to see the screen
flushing.

For the Up and Down screen transitions implement the screen movement.
When moving Down, move the the whole screen content down, and then draw
the new part of the new screen at the top of the display. Repeat until
screen transition is finished.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/13
2022-06-13 23:48:30 +02:00
Reinhold Gschweicher 53d765bbd8 Update LittleVgl with upstream changes 2022-06-13 23:48:30 +02:00
NeroBurner ce22ba29c9 Remove MotorController, use nrf_gpio Motor pin, apptimer repeat (#34)
Remove the custom MotorController class and use the upstream
MotorController instead.

To enable this move add custom code in nrf_gpio to handle the Motor pin
instead of the custom motor_is_running member variable.

Also implement the repeating app_timer type used in the upstream
MotorController.
2022-06-05 22:03:53 +02:00
NeroBurner f64e1aab80 Fix notification segfault (#36)
Need to loop the notification_idx after half the notification_messages
size since the change of splitting the subject and message body into two
strings.
2022-06-05 22:00:50 +02:00
NeroBurner 6313a7498b CI: install lv_font_conv binary (#35)
We consider in CMake if we add the font subdir, but we didn't install
the `lv_font_conv` binary.
2022-06-05 21:58:12 +02:00
Reinhold Gschweicher 068c5a823e main: Fix 'N' clear new notification flag documentation
The documentation for the 'N' key wrongly stated it clears all
notifications. But in the code we see that just the new notification
flag is reset.
2022-05-16 23:45:34 +02:00
Reinhold Gschweicher 5f1dc192ac Update submodule with fonts target fix
Update InfiniTime to contain fix from
https://github.com/InfiniTimeOrg/InfiniTime/pull/1131
2022-05-16 19:27:37 +02:00
Reinhold Gschweicher 9427d4ddb1 SpiNorFlash: check Read/Write for out of bounds
Just to be extra pedantic and to get an error while developing on
InfiniSim. Because on PC we can easily add the debugger, on the device
we can, but it is a bit more involved.
2022-05-15 22:47:41 +02:00
Reinhold Gschweicher f0c6ef9cd6 Use infinitime_fonts target if fonts/CMakeLists.txt exists
Since https://github.com/InfiniTimeOrg/InfiniTime/pull/1097 the fonts
are generated. Support this new way of using fonts.

When InfiniTime isn't a subdirectory of InfiniSim we need to provide
the binary dir when using `add_subdirectory()`. Use `fonts`.

Update README with instructions to install `lv_font_conv`.
2022-05-14 21:31:26 +02:00
Reinhold Gschweicher d9d729d40f FS: fix FS::Stat function by looking at local dir instead of /
Like in `FileOpen()` interpret filenames starting with `/` as paths
relative to the current working directory by removing the first `/` from
the path.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/23
2022-04-24 23:23:45 +02:00
NeroBurner de8d0d6b6f SpiNorFlash: code style fix 2022-04-24 19:13:56 +02:00
Reinhold Gschweicher 7194e3e38e SpiNorFlash: use C++ style struct in C++ only header
`SpiNorFlash.h` is a C++ header, but the `Identification` struct is
created in a C style using `typedef struct`. Clang issues a warining
about this discrepancy:

```
In file included from /home/nero/repos/pinetime/InfiniSim/InfiniTime/src/systemtask/SystemTask.cpp:13:
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:16:21: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
      typedef struct __attribute__((packed)) {
                    ^
                     Identification
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:17:9: note: type is not C-compatible due to this default member initializer
        uint8_t manufacturer = 0;
        ^~~~~~~~~~~~~~~~~~~~
/home/nero/repos/pinetime/InfiniSim/sim/drivers/SpiNorFlash.h:20:9: note: type is given name 'Identification' for linkage purposes by this typedef declaration
      } Identification;
        ^
1 warning generated.
```

The easy fix is to use a C++ style struct.

Same fix as in: https://github.com/InfiniTimeOrg/InfiniTime/pull/1046
2022-04-24 19:13:56 +02:00
Reinhold Gschweicher 7110fa0034 cmake: create QCBOR target and link to InfiniSim 2022-04-08 11:26:30 +02:00
Reinhold Gschweicher 9f36b7886d FS: copy lfs_info and implement FS::Stat()
Implement the subset of the functionality to be usable to check if the
file exists or not and check the size of the file.
2022-04-04 21:22:57 +02:00
Reinhold Gschweicher d4e81ca177 Fix libpng submodule usage
The current usage used the system `png.h` header instead of the intended
submodule header. This may break if the system header isn't at
`libpng16/png.h`.

Fix the include header to get the genreated include files and the
`png.h` from the submodule as described in
https://github.com/glennrp/libpng/issues/342#issuecomment-864589614

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/19
2022-04-03 21:35:09 +02:00
Reinhold Gschweicher 80ef18cce0 Update InfiniTime to 1.9.0 development branch 2022-04-02 17:56:09 +02:00
Reinhold Gschweicher 6567a67aef cmake: add a status message which MONITOR_ZOOM is used 2022-03-30 22:15:02 +02:00
Reinhold Gschweicher 726f759ca4 fix compile error by removing static_assert 2022-03-30 22:13:58 +02:00
Reinhold Gschweicher bf3a255ca4 Cst816s: scale down SDL mouse coordinates according to MONITOR_ZOOM
The lv_drivers provided monitor driver supports a `MONITOR_ZOOM`-factor
which scales the window by the set factor. This is 'useful when
simulating small screens'.

The zoom can be set as cmake configuration setting `-DMONITOR_ZOOM=1`.

Probably even more usefull for high-dpi screens where 240 pixels is
really tiny.
2022-03-30 20:51:41 +02:00
Reinhold Gschweicher 84195fa44b Update InfiniTime submodule to current develop 2022-03-29 22:57:50 +02:00
Reinhold Gschweicher 3cc6e74ea1 sim/timers: implement xTimerGetExpiryTime, xTimerIsActive, more accurate
Implement the missing functions `xTimerGetExpiryTime()` and `xTimerIsActive()`
for the move of `TimerController` to use FreeRTOS timers.

In the process also fix a slight inaccuracy in the ms to ticks
conversion (no conversion was done as 1000 was close enough to 1024 for
a first working implementation).

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/17
2022-03-29 22:41:09 +02:00
Reinhold Gschweicher d6cc748ea1 InfiniTime: update submodule for analog watchface warning fixes 2022-03-19 01:01:43 +01:00
Reinhold Gschweicher 00ccde99e9 Add install target to create system packages 2022-03-19 00:57:53 +01:00
Reinhold Gschweicher eb7b589826 cmake: use main lv_conf.h, use file globs for fonts and icons
To make the simulator work without modification for more PRs use the
original `lv_conf.h` file and modify the needed parts for the simulator.

Furthermore use globbing expressions to add all available fonts and
icons in case a PR adds new fonts or icons.
2022-03-09 23:17:57 +01:00
Reinhold Gschweicher 0b12245c08 Use relative path for libpng submodule, don't force ssh/http 2022-03-08 21:48:55 +01:00
NeroBurner 2e81595abf Merge pull request #10 from InfiniTimeOrg/screenshots
main: implement saveScreenshot() writing bmp/png from SDL window buffer
2022-03-08 21:45:11 +01:00
Reinhold Gschweicher dfbc345511 main: implement saveScreenshot() writing bmp/png from SDL window buffer
When pressing `i` create a screenshot of the current InfiniTime screen
by dumping it to a timestamped png or bmp file like
`InfiniSim_2022-03-08_203421.png`.

Add a new configure option `WITH_PNG` with default `ON`. When switched
to `OFF` the screenshots will be created in `bmp` format.

Fixes: https://github.com/InfiniTimeOrg/InfiniSim/issues/5
2022-03-08 21:39:16 +01:00
NeroBurner 819d9cbdcb Merge pull request #7 from InfiniTimeOrg/systemmonitor_add_cpp_file
add SystemMonitor.cpp and switch to official InfiniTime repo
2022-03-08 20:57:09 +01:00
Reinhold Gschweicher e5ce07cb75 Use official InfiniTime project with latest develop branch 2022-03-08 20:47:46 +01:00