summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2021-06-20tools: Update nrfutil for click 8.x compatibilityDaniel Thompson
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-20rle_encode: Include the image size in the commentsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-05-05wasptool: Fix progress bar numberingDaniel Thompson
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-03-27wasptool: add --battery to check battery levelthefenriswolf
Signed-off-by: thefenriswolf <stefan.rohrbacher97@gmail.com>
2021-02-25tools: wasptool: Fix binary downloads for a specific special caseDaniel Thompson
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-21tools: wasptool: Additional adoption of the run_command wrapperDaniel Thompson
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-21tool: wasptool: Add a free memory reporting toolDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2021-02-21tools: wasptool: Better REPL integrationDaniel Thompson
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-21tools: wasptool: Add push/pull commandsDaniel Thompson
--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-20Added Docker setup to build wasp-os.Shuhao Wu
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-01-10wasptool: Allow files to be renamed during an uploadDaniel Thompson
For example: ./tools/wasptool --upload docs/main/chrono.py --as main.py Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-31manager: Recategorize the theme labels for appsDaniel Thompson
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-31wasp: manager: Byte-swap the theme encodingDaniel Thompson
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-29tools: rle_encode: Add a parameter for direct CLUT lookupDaniel Thompson
This can be useful for hand decoding and authoring of images. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-28tools: rle_encode: Make 2-bit encoding the defaultDaniel Thompson
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-13tools: themer: Fix the online helpDaniel Thompson
Correct the indentation and the quoting of the theme strings. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-12-13widgets: BatteryMeter: Fix theme handlingDaniel Thompson
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-13Added basic theming engine.kozova1
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-12tools: Update intelhex, hexmerge.py and nrfutil for python 3.9 compatibilitySiroj42
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-10tools: hexmerge: Replace redundant copy with a symlinkDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-08tools: rle_encode: Add support for rendering 2-bit RLEs to C srcDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-11-04hex2c.py: Adopt a maximum chunk sizeDaniel Thompson
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-10-21tools: wasptool: Improve error reporting if we can't syncDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-21tools: wasptool: Fix verbose/not-verbose handlingDaniel Thompson
Fixes: 2839a04 ("tools: wasptool: Hide the stack trace on pexpect timeout") Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-10-10tools: wasptool: Hide the stack trace on pexpect timeoutDaniel Thompson
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-10tools: wasptool: Wait longer for DFU to come upDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-08-14wasptool: Change Python shebang to ensure compatibilityPanagiotis Vasilopoulos
- 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-02tools: preprocess: Ensure we use python3 interpreterDaniel Thompson
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-07-26wasptool: Add support for selecting devices by name and MAC addressDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-30wasp: Switch to scheduling from interruptDaniel Thompson
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-20wasptool: Add support for binary uploadsDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-20wasptool: Fix --resetDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-06-09tools: hex2c: Add crc32s for each segmentDaniel Thompson
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
2020-05-25wasptool: Better reporting of out-of-memory problems when pastingDaniel Thompson
2020-05-24wasptool: Enable fully automatic OTA firmware deliveryDaniel Thompson
2020-05-18draw565: Switch to a different palette for RLE 2-bit imagesDaniel Thompson
This is an incompatible change... older 2-bit images will need to be re-encoded to display correctly.
2020-05-15pynus: Switch to the wasp-os versionDaniel Thompson
2020-05-14Make wasp-os namig consistantDaniel Thompson
Rename WASP to wasp-os (or Wasp-os)
2020-05-09wasptool: Add a command to compare RTC against the local workstationDaniel Thompson
This allows us to observe RTC drift during reboot relatively easily.
2020-05-09tools: ota-dfu: Adopt latest versionDaniel Thompson
2020-04-26reloader: OTA flashing tool for wasp-osDaniel Thompson
2020-04-26tools: ota-dfu: Include a Linux-native OTA DFU toolDaniel Thompson
2020-04-26tools/hexmerge: Fix file permissionsDaniel Thompson
2020-04-26tools: wasptool: Improve command output for --exec and --evalDaniel Thompson
2020-04-17tools: wasptool: Introduce simple chunkingDaniel Thompson
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!
2020-04-17tools: wasptool: Add support for --resetDaniel Thompson
2020-04-11wasp: Automatically generate watch.py for PineTimeDaniel Thompson
This should ensure that main.py is always up to date.
2020-04-10tools: wasptool: Change characters used in the progress barDaniel Thompson
2020-04-10tools: rle_encode: Optimize the 2-bit encoding slightlyDaniel Thompson
This results in a image that is entirely ROMable.
2020-04-06tools: wasptool: Add a progress bar to the BLE uploadsDaniel Thompson