This is a simple Python emulator capable of running/displaying OSW Lua based apps. This allows apps to be created and tested on a PC before integrated into the Osw firmware.
Python 3 is required and can be downloaded from here: https://www.python.org/download/releases/3.0/
Navigate to the Lua Emulator folder and run the following to install the Python dependencies:
pip install -r requirements.txt
python emulate.py <SCRIPT NAME>
Included is an example.lua
script. This script is a Lua port of stopwatch.cpp
python emulate.py example.lua
- btn1Down, btn2Down, btn3Down
- These are mapped to keyboard buttons 1, 2, 3
- getCanvas()
- This will return a Python Canvas implementation which supports most drawing and printing functions
- getLocalTime()