1
0
Fork 0
Commit graph

86 commits

Author SHA1 Message Date
Francesco Gazzetta
faa18b7129 tools/pynus: Update to latest version
Includes NixOS fix

Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2024-09-30 09:25:38 +01:00
Francesco Gazzetta
749fe3432f Pin GCC 11 in nix shell
Some checks failed
wasp-os binary distribution / build (push) Has been cancelled
wasp-os simulator tests / build (push) Has been cancelled
Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2024-04-22 12:34:34 +01:00
jfekete1
89be0be23c added send notification feature
Signed-off-by: jfekete1 <fekete.jozsef@protonmail.com>
2023-10-31 17:12:20 +00:00
Francesco Gazzetta
b7d772db8e Add .readthedocs.yaml
It is now mandatory
https://blog.readthedocs.com/migrate-configuration-v2/

Also fixes empty app library in rtd.

Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2023-09-27 15:52:59 +01:00
thiswillbeyourgithub
43eb3f3980 Update tools/wasptool
Co-authored-by: Francesco Gazzetta <fgaz@fgaz.me>
Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
2023-09-27 13:07:21 +01:00
olivier-cornelis
ee257d6ade new: allow to specify local name of file when using wasptool pull with argument 'as'
Signed-off-by: olivier-cornelis <klduycea@mailer.me>
2023-09-27 13:07:21 +01:00
Francesco Gazzetta
0424efd304 Add nix development shell
Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2023-08-24 10:16:11 +01:00
Adam Blair
e494eab608 Wasp A La carte
Configure wasp using a central toml file

Signed-off-by: Adam Blair <adampblair@protonmail.com>
2023-03-19 15:17:18 +00:00
Daniel Thompson
99272f482f tools/pynus: Update to latest version
* Use a more compatible shebang

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2023-01-15 18:16:55 +00:00
Daniel Thompson
3a57bee8b6
Merge pull request #337 from fgaz/upload-base64
Use base64 encoding for binary upload
2022-08-15 15:56:08 +01:00
Francesco Gazzetta
6147ea5712 Use base64 encoding for binary upload
The old encoding had a 300% overhead
Base64 has a 33% overhead

Signed-off-by: Francesco Gazzetta <fgaz@fgaz.me>
2022-06-15 20:04:10 +02:00
thiswillbeyourgithub
f4e03ab3cd docs: explicit --binary help
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.comm>
2022-03-27 09:29:57 +01:00
thiswillbeyourgithub
a76c2413fb fix: forces root to be redirected locally
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.comm>
2022-02-27 20:08:18 +00:00
thiswillbeyourgithub
dbe489ce68 fix: wasptool --pull fails when downloading nested file
Signed-off-by: thiswillbeyourgithub <github@32mail.33mail.comm>
2022-02-27 20:08:18 +00:00
Daniel Thompson
9012b85ede wasp: Switch recommended toolset to 10-2020-q4
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-12-24 09:28:22 +00:00
Daniel Thompson
da71d39aa4 tools: wasptool: Increase OTA reboot timeout
Currently --ota works "most of the time" but occasionally the OTA
fails to start. Let's give the reset an extra second to settle!

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-09-10 21:17:57 +01:00
Daniel Thompson
2a3ffad07d wasptool: Automatically create directories during upload
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-09-10 21:17:57 +01:00
Daniel Thompson
a28a2cd7f4 tools: hrs2csv: Add a simple parser for hrs.data files
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-08-07 21:13:40 +01:00
Andreas Kloeckner
bbadbd34c7 Fix escape sequences in wasptool
Signed-off-by: Andreas Kloeckner <inform@tiker.net>
2021-07-25 09:42:39 +01:00
Daniel Thompson
04e35d437e wasptool: Make mem_free issue data as csv
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-07-25 09:42:26 +01:00
Daniel Thompson
29d619aebc tools: Update nrfutil for click 8.x compatibility
Tested on Debian bullseye using wasp/requirements.txt in order to get
the latest version of click.

Fixes: #211
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-20 15:19:24 +01:00
Daniel Thompson
c373bc4d77 rle_encode: Include the image size in the comments
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-06-20 10:18:27 +01:00
Daniel Thompson
3bbd808115 wasptool: Fix progress bar numbering
Currently direct callers of draw_pbar() can have 20 or more digits after
the decimal place. Fix this by moving the rounding function.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-05-05 21:02:16 +01:00
thefenriswolf
d966c960c1 wasptool: add --battery to check battery level
Signed-off-by: thefenriswolf <stefan.rohrbacher97@gmail.com>
2021-03-27 09:03:14 +00:00
Daniel Thompson
cabe6f143c tools: wasptool: Fix binary downloads for a specific special case
Currently if the binary file being downloaded contains single quote
characters then it gets wrapped differently by repr() so we have to add
additional cases to strip the wrapper.

Fix this the "obvious" way... where by "obvious" I mean almost anything
but.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-25 07:25:32 +00:00
Daniel Thompson
b734037115 tools: wasptool: Additional adoption of the run_command wrapper
run_command has particular benefits for handle_binary_download() because
we can greatly simplify the code to handle running repr() on the target.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21 17:08:32 +00:00
Daniel Thompson
326caa3fa5 tool: wasptool: Add a free memory reporting tool
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21 17:02:02 +00:00
Daniel Thompson
88347f9c7c tools: wasptool: Better REPL integration
Add a run_command method for the "console". This allows running a command
on the target and capturing the result. Normally this is handled using
REPLWrapper but that doesn't work well with the NUS console because local
echo gets in the way.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21 17:01:36 +00:00
Daniel Thompson
80c340b005 tools: wasptool: Add push/pull commands
--push is very similar to --binary --upload but handles directories
differently. --pull allows us to copy binary files from the target.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21 09:53:49 +00:00
Shuhao Wu
268f8c06e9 Added Docker setup to build wasp-os.
This should make it a bit easier for people to contribute. Also fixed
the documentations on how to setup on Debian, as certain recommended
packages don't exist.

Signed-off-by: Shuhao Wu <shuhao@shuhaowu.com>
2021-02-20 08:44:22 +00:00
Daniel Thompson
e79625685d wasptool: Allow files to be renamed during an upload
For example:

    ./tools/wasptool --upload docs/main/chrono.py --as main.py

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-01-10 14:49:36 +00:00
Daniel Thompson
ad9714b0dc manager: Recategorize the theme labels for apps
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>
2020-12-31 19:22:54 +00:00
Daniel Thompson
1eada36ff4 wasp: manager: Byte-swap the theme encoding
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>
2020-12-31 10:09:38 +00:00
Daniel Thompson
4425d81485 tools: rle_encode: Add a parameter for direct CLUT lookup
This can be useful for hand decoding and authoring of images.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-29 09:05:35 +00:00
Daniel Thompson
ed4a5503ba tools: rle_encode: Make 2-bit encoding the default
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>
2020-12-28 12:02:45 +00:00
Daniel Thompson
8824646939 tools: themer: Fix the online help
Correct the indentation and the quoting of the theme strings.

Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-13 16:51:07 +00:00
Daniel Thompson
4468285c34 widgets: BatteryMeter: Fix theme handling
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>
2020-12-13 16:51:07 +00:00
kozova1
2624a6e998 Added basic theming engine.
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>
2020-12-13 16:51:07 +00:00
Siroj42
c1773a3976 tools: Update intelhex, hexmerge.py and nrfutil for python 3.9 compatibility
Signed-off-by: Joris Warmbier <siroj42@t-online.de>
[daniel@redfelineninja.org.uk: Remove changes to tools/hexmerge.py]
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-12 09:11:12 +00:00
Daniel Thompson
fd288e01b8 tools: hexmerge: Replace redundant copy with a symlink
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-10 19:44:40 +00:00
Daniel Thompson
67d2ed83d2 tools: rle_encode: Add support for rendering 2-bit RLEs to C src
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-08 14:29:10 +00:00
Daniel Thompson
9dd793ff19 hex2c.py: Adopt a maximum chunk size
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>
2020-11-04 19:06:03 +00:00
Daniel Thompson
2b244ec2a3 tools: wasptool: Improve error reporting if we can't sync
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-21 20:49:48 +01:00
Daniel Thompson
2bb0837440 tools: wasptool: Fix verbose/not-verbose handling
Fixes: 2839a04 ("tools: wasptool: Hide the stack trace on pexpect timeout")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-21 20:48:12 +01:00
Daniel Thompson
2839a042be tools: wasptool: Hide the stack trace on pexpect timeout
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>
2020-10-10 21:42:51 +01:00
Daniel Thompson
b6357ad4d8 tools: wasptool: Wait longer for DFU to come up
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10 21:42:51 +01:00
Panagiotis Vasilopoulos
eca0551c3e
wasptool: Change Python shebang to ensure compatibility
- 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>
2020-08-14 08:53:27 +03:00
Daniel Thompson
c74d9e296b tools: preprocess: Ensure we use python3 interpreter
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>
2020-08-02 11:54:58 +01:00
Daniel Thompson
b4e78935ba wasptool: Add support for selecting devices by name and MAC address
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-07-26 21:04:30 +01:00
Daniel Thompson
ae5743529f wasp: Switch to scheduling from interrupt
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>
2020-06-30 23:04:01 +01:00