By default bright and mid are white/grey tones, the ui widgets are
blue and the spot colours are different variants of orange.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Currently the theme is explicitly little endian. This does match the
underlying hardware but makes it needlessly difficult to hand edit
themes. Switch the default theme and theming tools over to big endian
form and add comments to the default theme to support hand editing.
We also expand the ASCII characters in the default them with hex codes.
This is the final step needed to make hand edited themes trivial to work
with.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2-bit encoding is fully ROMable and therefore is more RAM efficient than
the older 1-bit encoding.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Add the battery frame to the theme so it matches the frame used for
charging and rename accordingly.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This theming engine uses a bytestring (but supports anything indexable,
as long as the index results are a byte long),
stored as `wasp.system._theme`.
It has a default value, which should not change anything about the way this looks currently.
The theme can be set via `wasp.system.set_theme`,
but this should *ONLY* be used in `main.py`.
`wasp.system.set_theme` will return True if it was successful,
or False if the theme is of an old format.
Using an old format theme will *not* crash the watch,
but will use the default theme instead.
To theme this, one has to use tools/themer.py (use flag -h for complete explanation)
to generate a bytestring that's added in main.py (see diff).
The bytestring is then loaded into 'wasp.system._theme'.
Theme values can be looked up by apps by using `wasp.system.theme("theme-key")`.
Theme keys appear in the function body of `wasp.system.theme()`.
I've took the liberty of converting existing apps to use this method,
and it seems to work well.
A test theme is provided in `tools/test_theme.py`
Signed-off-by: kozova1 <mug66kk@gmail.com>
Large segments will be chunked into 32K blocks to they can be handled
seperate. Creating a maximum chunk size allows us to perform a few
tricks in the reloader by allowing us to overwrite parts of the reloader
whilst it is running!
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
The default pexpect exception dump is verbose and potentially useful if
you know how to read it... but let's handle timeouts in a friendlier way.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
- Certain Unix-like systems (such as *BSD systems) do not use /usr/bin/python3 as the default Python path. This small change will ensure a higher degree of compatibility.
Signed-off-by: Panagiotis Vasilopoulos <hello@alwayslivid.com>
Not being explicit about the correct python interpreter causes trouble
on distros that do not alias python to python3 and/or that do not
install python2 by default.
Reported by: Mirko Covizzi <mrkcvzz@gmail.com>
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This has two useful properties. Firstly it means the watch will be
maintained in the background, allowing the REPL to be used for
notifications and other updates. Secondly it will save a little bit
of power by reducing the work needed to handle spurious wake ups.
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This reduces the memory overhead required to --exec a file (although
we will still have problems with big classes).
For now we have avoided matching "^def" since we need additional
handling for decorators!
This is a big change that break compatiblity with existing applications
*and* with existing installed versions of main.py.
When upgrading it is import to update main.py:
./tools/wasptool --upload wasp/main.py
This allows for an elegant iterative development approach where we upload
some code than then interact with it, for example:
wasptool --exec wasp/drivers/nrf_rtc.py --console
rtc = RTC(watch.rtc.counter)