Simulator for InfiniTime project.
Experience the InfiniTime
user interface directly on your PC, to shorten the time until you get your hands on a real PineTime smartwatch.
Or use it to develop new Watchfaces, new Screens, or quickly iterate on the user interface.
For a history on how this simulator started and the challenges on its way visit the original PR.
- CMake
- SDL2 (provides the simulator window, handles mouse and keyboard input)
- Compiler (g++ or clang++)
On Ubuntu/Debian install the following packages:
sudo apt get install -y cmake libsdl2-dev g++
On Arch Linux the following packages are needed:
sudo pacman -S cmake sdl2 gcc
Clone this repository and tell git
to recursively download the submodules as well
git clone --recursive https://github.com/InfiniTimeOrg/InfiniSim.git
If you've already cloned the repository without the submodules (or you want to update them to the latest checked in version) run the following command:
git submodule update --init --recursive
In the most basic configuration tell cmake to configure the project and build it with the following two commands:
cmake -S . -B build
cmake --build build -j4
The following configuration settings can be added to the first cmake -S . -B build
call
-DInfiniTime_DIR=InfiniTime
: a full path to an existing InfiniTime repository checked out. Inside that directory thesrc/libs/lvgl
submodule must be checked out as well. The default value points to the InfiniTime submodule in this repository.
When the build was successful the simulator binary can be started with
./build/infinisim
To hide the second simulator-status-window start the binary with the --hide-status
option
./build/infinisim --hide-status
- Left mouse button: simulates your finger, just click to tap, click and drag to swipe
- Right mouse button: simulates the hardware button (for example turn the screen off or on again)
Using the keyboard the following events can be triggered:
r
... enable ringingR
... disable ringingm
... let motor run for 100 msM
... let motor run for 255 msn
... send notificationN
... clear all notificationsb
... connect BluetoothB
... disconnect Bluetoothv
... increase battery voltage and percentageV
... decrease battery voltage and percentagec
... charging,C
... not chargingl
... increase brightness levelL
... lower brightness levelp
... enable print lvgl memory usage to terminalP
... disable print memory usages
... increase step count by 500 stepsS
... decrease step count by 500 stepsh
... set heartrate running, and on further presses increase by 10 bpmH
... stop heartrate
This project is released under the GNU General Public License version 3 or, at your option, any later version. The same license as InfiniTime.
The simulator is based on lv_sim_eclipse_sdl project under the MIT license.