GithubHelp home page GithubHelp logo

arthurlutz / infinisim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from infinitimeorg/infinisim

0.0 1.0 0.0 113 KB

Simulator for InfiniTime user interface without needing a PineTime

License: GNU General Public License v3.0

CMake 4.54% C 16.67% C++ 78.79%

infinisim's Introduction

InfiniSim

Build InfiniSim LVGL Simulator

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.

Build dependencies

  • 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

Get the Sources

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

Configure and Build

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 the src/libs/lvgl submodule must be checked out as well. The default value points to the InfiniTime submodule in this repository.

Run Simulator

When the build was successful the simulator binary can be started with

./build/infinisim

Running Simulator

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 ringing
  • R ... disable ringing
  • m ... let motor run for 100 ms
  • M ... let motor run for 255 ms
  • n ... send notification
  • N ... clear all notifications
  • b ... connect Bluetooth
  • B ... disconnect Bluetooth
  • v ... increase battery voltage and percentage
  • V ... decrease battery voltage and percentage
  • c ... charging,
  • C ... not charging
  • l ... increase brightness level
  • L ... lower brightness level
  • p ... enable print lvgl memory usage to terminal
  • P ... disable print memory usage
  • s ... increase step count by 500 steps
  • S ... decrease step count by 500 steps
  • h ... set heartrate running, and on further presses increase by 10 bpm
  • H ... stop heartrate

Licenses

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.

infinisim's People

Contributors

neroburner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.