Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of Poethepoet package as task runner manager #305

Closed
wants to merge 211 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
211 commits
Select commit Hold shift + click to select a range
84e86bb
add batch airgapped firmware signer script
odudex Sep 1, 2023
2bc8578
event/irq based touch and buttons
odudex Aug 30, 2023
fbe714b
add anti-glare to OV2640 sensor
odudex Aug 30, 2023
7b1aaf0
add Yahboom AI motion compatibility
odudex Sep 1, 2023
59ad3a6
Merge branch 'selfcustody:main' into develop_irq_based
odudex Sep 15, 2023
ccfb51f
remove part of thermal printer settings
odudex Sep 15, 2023
db88594
integrated debounce control
odudex Sep 15, 2023
2192163
Merge branch 'develop_irq_based' of https://github.com/odudex/krux in…
odudex Sep 15, 2023
ced4f36
Merge branch 'selfcustody:main' into develop_irq_based
odudex Sep 18, 2023
f098b3f
docs for maintaining fonts
Sep 10, 2023
467ab0d
google-translate food for PL/RU fonts
Sep 10, 2023
09ab989
remove temporary glyphs
odudex Sep 12, 2023
b3a2723
Adding RU translation
aglkm Sep 14, 2023
c009b8a
translations update
odudex Sep 18, 2023
79d5900
use LF instead of feed command on thermal printer
odudex Sep 18, 2023
d7cd62c
version update
odudex Sep 18, 2023
2013ba9
Merge branch 'selfcustody:develop_irq_based' into develop_irq_based
odudex Sep 18, 2023
f2a0dd8
Merge pull request #245 from selfcustody/develop
odudex Sep 18, 2023
e656d72
Merge branch 'selfcustody:develop_irq_based' into develop_irq_based
odudex Sep 18, 2023
c812d2e
flash msg on decrypt errors for better translation
odudex Sep 18, 2023
5e89fd9
Other docs small fixes
tadeubas Sep 18, 2023
917f0cd
Merge branch 'main' into develop_irq_based
odudex Sep 19, 2023
b944b07
simulator adjustments for IRQ interface
odudex Sep 20, 2023
0031b24
IRQ interface and simulator improvements
odudex Sep 20, 2023
42379b0
handle event touches without release point
odudex Sep 20, 2023
db1bdfe
simulator fix - IRQ based
odudex Sep 21, 2023
e332c33
adapt simulator screenshot seqs to IRQ interface
odudex Sep 26, 2023
e7aa897
creating screensaver
tadeubas Sep 26, 2023
28f4c2d
add sd card info to xpub on docs
tadeubas Sep 27, 2023
e3df58a
simulator encoding fix
tadeubas Sep 27, 2023
a99cf18
added maixpy_dock img to simulator
tadeubas Sep 27, 2023
12c4e1a
minified boot SPLASH
tadeubas Sep 27, 2023
f62b3d8
Merge branch 'selfcustody:main' into screensaver
tadeubas Sep 27, 2023
e80f992
screensaver enabled on all menus
tadeubas Sep 27, 2023
cdfeec1
black and pylint
tadeubas Sep 28, 2023
a06219a
change dock.png for simulator
tadeubas Sep 28, 2023
ae36e2b
no more screen blinks on screensaver
tadeubas Sep 28, 2023
836ca00
black
tadeubas Sep 28, 2023
5958a52
screensaver settings
tadeubas Sep 28, 2023
13ada9d
traduções screensaver
tadeubas Sep 28, 2023
f6e5fd6
better centralization of the screensaver
tadeubas Sep 29, 2023
fa533dd
Merge branch 'develop_irq_based' of github.com:selfcustody/krux into …
tadeubas Sep 29, 2023
2d7f1b7
adapt tests to IRQ interface
odudex Sep 29, 2023
2819126
Merge branch 'develop_irq_based' of github.com:selfcustody/krux into …
tadeubas Sep 29, 2023
64b766d
bugfix: discard invalid point touch presses
odudex Sep 29, 2023
c6d4556
Merge branch 'develop_irq_based' of github.com:selfcustody/krux into …
tadeubas Sep 29, 2023
d70cfb4
touch adjustments
odudex Sep 30, 2023
06123e0
fix code typo
aglkm Oct 1, 2023
9eae0f3
Merge branch 'develop_irq_based' of github.com:selfcustody/krux into …
tadeubas Oct 1, 2023
15556e2
added missing translations
tadeubas Oct 1, 2023
61e8054
Merge pull request #25 from aglkm/fix_code_typo
odudex Oct 2, 2023
144cbc7
pylint on touch changes
odudex Oct 2, 2023
3d6a3bb
add options to restore settings and wipe device
odudex Oct 4, 2023
feca49f
creating tests for screensaver
tadeubas Oct 5, 2023
a1eb939
Merge branch 'develop_irq_based' of github.com:selfcustody/krux into …
tadeubas Oct 5, 2023
f3f3260
fix some test in constant loop on test_input
tadeubas Oct 5, 2023
689678b
black and i18n
tadeubas Oct 5, 2023
2dea81b
Merge pull request #26 from tadeubas/develop_irq_based
odudex Oct 5, 2023
cfe8c71
fix_input_test
odudex Oct 5, 2023
2f2d2d3
Merge branch 'develop_irq_based' into integrated_changes
odudex Oct 6, 2023
e901c2e
add screensaver as a appearance setting
odudex Oct 7, 2023
42d1b54
move flash parameters to firmware.py
odudex Oct 8, 2023
aacc078
fix animated QR event detection
odudex Oct 8, 2023
972b4a2
tests and simulator printer settings in hardware
odudex Oct 9, 2023
151af69
Update to Embit 0.7
odudex Oct 9, 2023
f18f14f
better handling of bytes data from QR
odudex Oct 11, 2023
56e7753
sign messages at derived addresses
odudex Oct 11, 2023
452545d
encoding adjustments for simulator and Android
odudex Oct 13, 2023
f189a29
polish message signing - cut big messages
odudex Oct 17, 2023
9781482
erase_spiffs() to do so in 4k chunks
Oct 19, 2023
5dffaa6
Merge pull request #272 from jdlcdl/integrated_changes
odudex Oct 19, 2023
deb44f8
Merge branch 'main' into integrated_changes
odudex Oct 21, 2023
d54e064
Merge branch 'integrated_changes' of https://github.com/selfcustody/k…
odudex Oct 21, 2023
952c25f
isolate file saving operations on dedicated page
odudex Oct 21, 2023
227d94a
isolate message signing ui
odudex Oct 21, 2023
d67ee16
fix screensaver button check
tadeubas Oct 23, 2023
f9d3e6f
Merge branch 'integrated_changes' of github.com:selfcustody/krux into…
tadeubas Oct 23, 2023
7ddb6f4
Wallet output descriptor load from and save to SD card
tadeubas Oct 24, 2023
0b3ce72
Merge pull request #275 from tadeubas/develop_irq_based
odudex Oct 24, 2023
156d96c
Fix wallet descriptor export SD
tadeubas Oct 24, 2023
4c6db93
Merge pull request #276 from tadeubas/develop_irq_based
odudex Oct 24, 2023
0187b50
descriptor import bugfix
odudex Oct 24, 2023
fdbc4b1
remove unnecessary screen clean
odudex Oct 24, 2023
999ec4a
version to beta 4
odudex Oct 24, 2023
be78d9d
file_extension now accepts tuple or list
tadeubas Oct 24, 2023
ad20ed8
Changed wallet output multisig display
tadeubas Oct 24, 2023
b531b3f
add try except block around displayQRCode (because of out of memory i…
tadeubas Oct 24, 2023
2ea6545
fix home test_sign_message
tadeubas Oct 24, 2023
d958433
file_extension now accepts tuple or list
tadeubas Oct 24, 2023
c5e3ed5
Changed wallet output multisig display
tadeubas Oct 24, 2023
842e3d6
add try except block around displayQRCode (because of out of memory i…
tadeubas Oct 24, 2023
8a09667
fix home test_sign_message
tadeubas Oct 24, 2023
fdfa878
Merge pull request #277 from tadeubas/develop_irq_based
odudex Oct 25, 2023
d5b1a1e
Merge branch 'integrated_changes' of https://github.com/selfcustody/k…
odudex Oct 25, 2023
a429a08
add method to fit long strings into single line
odudex Oct 25, 2023
e232b7d
add utils file containing shared subpages
odudex Oct 25, 2023
0752bcf
expand utils' print usage
odudex Oct 25, 2023
a28e1ae
tests: home.print_standard_qr becomes home.utils.print_standard_qr
Oct 26, 2023
19b37fe
tests: test_wallet() one more "enter" for last test case
Oct 26, 2023
5ae1845
tests: screensaver waits for button instead of press
Oct 26, 2023
846bd0e
Merge pull request #279 from jdlcdl/integrated_changes
odudex Oct 26, 2023
f0c49b4
save QR codes as image on SD card - basic
odudex Oct 31, 2023
1750315
add menu offset option
odudex Nov 1, 2023
a7eb214
add infobox option to hcentered text
odudex Nov 1, 2023
e57c7dc
save QR as image: fix typo, add saved message
odudex Nov 1, 2023
a2c7c8f
better event handling for simultaneous events
odudex Nov 1, 2023
0988ecc
block QR code image export for raw private keys
odudex Nov 1, 2023
3faee7d
parallelizes public key options
odudex Nov 1, 2023
0d14705
fixed wallet descriptor display for multisig
tadeubas Nov 3, 2023
85d63cf
Merge pull request #30 from tadeubas/develop_irq_based
odudex Nov 3, 2023
3482874
Fix line breaker on text with multiple lines and exact match on the s…
tadeubas Nov 3, 2023
1d70620
maixpy using last commit from sipeed_update
tadeubas Nov 3, 2023
afc9df6
fix test_mnemonic_compact_qr
tadeubas Nov 3, 2023
e7ea217
Unfinished fix to test_public_key
tadeubas Nov 3, 2023
192fdd8
black
tadeubas Nov 3, 2023
465e125
12/24 word confirm when loading from digits (oct hex)
tadeubas Nov 3, 2023
8fac87f
Addresses page now shows more lines on big screens
tadeubas Nov 4, 2023
7b7d39f
Merge pull request #31 from tadeubas/develop_irq_based
odudex Nov 5, 2023
315f2e0
test_mnemonic_compact_qr print options
tadeubas Nov 5, 2023
e627c8a
allow custom file name for exported QR code images
odudex Nov 6, 2023
e0f0c9f
line break fix - a more generalist method
odudex Nov 6, 2023
b7dd563
Merge branch 'integrated_changes' of github.com:odudex/krux into deve…
tadeubas Nov 6, 2023
9e7d421
more test_to_lines_exact_match_amigo
tadeubas Nov 6, 2023
ce6e441
Merge pull request #32 from tadeubas/develop_irq_based
odudex Nov 6, 2023
290c1cb
Adding info on docs regarding dice rolls
tadeubas Nov 6, 2023
9873f18
small fixes and standardization
odudex Nov 6, 2023
3381647
fix pylint
tadeubas Nov 6, 2023
04c0b7c
added display_mnemonic_numbers to home
tadeubas Nov 6, 2023
eb6cab2
Merge pull request #33 from tadeubas/develop_irq_based
odudex Nov 7, 2023
f6763f8
dedicated files for mnemonic and pubkey viewers
odudex Nov 7, 2023
aa757a3
Display to_lines fixed by ChatGPT 3.5
tadeubas Nov 8, 2023
2c2747a
Merge pull request #34 from tadeubas/develop_irq_based
odudex Nov 8, 2023
f287f3e
New FAQ item - Why insert an SD card into my device
tadeubas Nov 8, 2023
6461407
bugfix - QR viewer index overflow on regions mode
odudex Nov 8, 2023
9505d36
info_box and partial menus adjustments
odudex Nov 8, 2023
9f4a10c
Merge pull request #35 from tadeubas/develop_irq_based
odudex Nov 8, 2023
35a8154
add test to loop through QR code regions
odudex Nov 8, 2023
c6423e2
Merge branch 'integrated_changes' of https://github.com/odudex/krux i…
odudex Nov 8, 2023
b56a33f
use binary img to store and handle QR codes
odudex Nov 12, 2023
77af024
adapt thermal print QR code to binary images
odudex Nov 13, 2023
37de115
add"Back to Main Menu" at bottom of qr viewer menu
odudex Nov 14, 2023
32e8717
simulator: compatibility to binary image QR code
odudex Nov 14, 2023
8d55220
fix tests - binary image QR , menu changes
odudex Nov 14, 2023
6177dfd
Merge pull request #284 from selfcustody/binary_img_qr
odudex Nov 15, 2023
28748ae
index fix
aglkm Nov 16, 2023
66b984b
Merge pull request #36 from aglkm/index_fix
odudex Nov 16, 2023
c5fa1d1
bugfix: ensure PBKDF2 iter. are multiple of 10000
odudex Nov 17, 2023
3ffe96d
change version
odudex Nov 18, 2023
b398ced
Merge branch 'main' into integrated_changes
odudex Nov 20, 2023
8f70e62
fix French translation and merge from main adjusts
odudex Nov 20, 2023
de90a3c
Refactor login and settings_page tests
tadeubas Nov 20, 2023
fe3414a
removed unused ucryptolib from test_login
tadeubas Nov 20, 2023
6f52a44
Fixed test_encryption_pbkdf2_setting
tadeubas Nov 20, 2023
c46448b
tests black
tadeubas Nov 20, 2023
2109ac2
typo
tadeubas Nov 20, 2023
ae26cc5
Merge branch 'integrated_changes' of github.com:selfcustody/krux into…
tadeubas Nov 20, 2023
4857f4b
merge test fixes
tadeubas Nov 20, 2023
6ed8acb
Merge pull request #289 from tadeubas/bugfixes-review
odudex Nov 21, 2023
4f03575
Encryption load error now shows only one error message
tadeubas Nov 21, 2023
ef919b1
Merge branch 'integrated_changes' of github.com:selfcustody/krux into…
tadeubas Nov 21, 2023
a4f1522
Test case for encryption + decription in sequence
tadeubas Nov 21, 2023
b917780
Merge pull request #290 from tadeubas/integrated_changes
odudex Nov 21, 2023
d8a2f72
optimize simulator QR code encoding
odudex Nov 23, 2023
300b124
Merge branch 'integrated_changes' of https://github.com/selfcustody/k…
odudex Nov 23, 2023
de99bfe
QR code frame count calculated instead of iterated
odudex Nov 24, 2023
71f9339
code review + one more test
tadeubas Nov 25, 2023
fb18d28
Fixed rare bug when viewing large addresses on small devices
tadeubas Nov 26, 2023
72055e0
Less frequent writes of settings.json to sd/flash
Nov 26, 2023
c8babfe
Default settings values no longer persisted!
Nov 26, 2023
be0be5b
Fixed multi-part UR progress indication
tadeubas Nov 27, 2023
5b24947
Merge pull request #294 from tadeubas/qr_code_pr
odudex Nov 27, 2023
e808ba4
more precise UR QR code size calc
odudex Nov 27, 2023
deaccaa
Merge branch 'main' into integrated_changes
odudex Nov 27, 2023
5b6ae2b
Merge pull request #296 from jdlcdl/reduced_settings_writes_without_d…
odudex Nov 29, 2023
873798f
Dependabot recommended security updates
odudex Nov 29, 2023
5285390
adapt UR QRs tests to new fragment size equation
odudex Nov 29, 2023
33f015c
Changelog update
odudex Dec 1, 2023
095ee23
add fingerprint and derivation icons
odudex Dec 2, 2023
da3ca1f
Merge branch 'integrated_changes' of https://github.com/selfcustody/k…
odudex Dec 2, 2023
52b2916
adapt theme settings to new storage method
odudex Dec 3, 2023
42aa1d6
change derivation icon
odudex Dec 4, 2023
91e98cf
seeds.json on sdcard padded to avoid abandoned bytes
Dec 7, 2023
bacd18c
removed unnecessary "pass", ty pylint
Dec 7, 2023
a6113dd
add message about Krux picking final word
odudex Dec 10, 2023
fd2aa1a
save QR code image on SD of pubkeys and adresses
odudex Dec 11, 2023
a0effc9
add disabled menu item element for SD card and printer related features
odudex Dec 12, 2023
aa99935
lower Amigos's camera bus frequency to reduce noise
odudex Dec 12, 2023
66b261c
add "toggle brightness" option on qr_view menu
odudex Dec 12, 2023
f7ac4fd
modify Amigo's OV7740 camera LDO voltages
odudex Dec 12, 2023
469d7ec
refactor i2c and pmu
odudex Dec 14, 2023
a186e71
Shannon's entropy calc for camera captures
odudex Dec 16, 2023
297d3c7
add shannon's entropy calc as a C Micropython module
odudex Dec 20, 2023
6b76412
pmu - fix simulator
odudex Dec 20, 2023
449353c
dice rolls - stats for nerds
odudex Dec 20, 2023
fa967d4
shannon's entropy for all devices
odudex Dec 21, 2023
80c98b2
an alternative to krux_colors.py
Dec 25, 2023
7391dd2
for little-endian k210: rgb565 becomes gbrg3553
Dec 27, 2023
48a33a6
Merge pull request #302 from jdlcdl/krux_colors
odudex Dec 27, 2023
d3a46d3
Merge branch 'integrated_changes' into shannons_entropy
odudex Dec 27, 2023
3ba934b
theme colors review
odudex Jan 4, 2024
964c1e3
add dice progress bar with Shannon's entropy
odudex Jan 5, 2024
1313057
dice rolls UI refactor and optimizations
odudex Jan 6, 2024
66752fb
Merge pull request #300 from jdlcdl/seeds_on_sd_never_trimmed
odudex Jan 8, 2024
6201418
Merge branch 'integrated_changes' of https://github.com/selfcustody/k…
odudex Jan 8, 2024
82dd03f
consider padding in mnemonic deletion on SD
odudex Jan 8, 2024
e766fd0
addresses tests now it is not possible to print scanned addresses
odudex Jan 8, 2024
1efba55
fix tests navigation on home and encryption UIs
odudex Jan 8, 2024
57beb7c
dice rolls bugfix for d6 12w
odudex Jan 10, 2024
864afc4
fix broken tests
odudex Jan 10, 2024
da70300
version update
odudex Jan 10, 2024
7ee7042
Added poethepoet as task runner
Jan 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
# Changelog 24.04.beta8 - November 20, 2023

## Changes

### IRQ Interfaces
Button and touch presses are now detected by the application through IO interrupts. Meaning inputs events will be registered and handled even if they happened when other tasks were being executed by the processor, resulting in a better UX.

### Save and Load Wallet Output Descriptor from SD card
Create or load from a wallet output descriptor file on a SD card. The backup file format is compatible with most coordinators.

### Restore Default Settings
Option to restore the device's settings to its factory state.

### Wipe Device
Option on settings to wipe the device, permanently removing settings and stored encrypted mnemonics by erasing every single bit of user's flash space.

### Screensaver
Optional screensaver to reduce pixels' burn-in and grab attention of the user when the device is left powered on.

### Maix Dock Simulator
Now Krux PC simulator can also run in Maix Dock mode, mimetizing appearance and characteristics of the most DIY Krux device

### Update Embit to version 0.7
Use latest Embit release

### Optimized QR codes
QR codes rendering is faster and uses less RAM

### Mnemonic Numbers
To match the input options, export mnemonics as decimal, hexadecimal or octal numbers
When loading from numbers, a new numbers confirmation screen was added.

### Addresses Exploring
More receive and change addresses per page are shown on bigger screens

### Export QR Codes as Images to SD Card
Some QR codes can be exported as images to SD card

### Optimized Settings Storage
Device's storage is now used more efficiently, data is stored less frequently, only in case a setting is changed from defaults.

### Other Small Fixes and Code Optimizations
Many other small fixes and optimizations under the hood


# Version 23.09.1 - November 18, 2023
This release contain bugfixes:

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,25 @@ Note that you can run `poetry install` after making a change to the krux code if

## Format code
```bash
poetry run black ./src
poetry run black ./tests
poetry run poe format
```

## Run pylint
```bash
poetry run pylint ./src
poetry run poe lint
```

## Run tests
```bash
poetry run pytest --cache-clear --cov src/krux --cov-report html ./tests
poetry run poe test
```

This will run all tests and generate a coverage report you can browse to locally in your browser at `file:///path/to/krux/htmlcov/index.html`.

For more verbose test output (e.g., to see the output of print statements), run:

```bash
poetry run pytest --cache-clear --cov src/krux --cov-report html --show-capture all --capture tee-sys -r A ./tests
poetry run poe test-verbose
```

To run just a specific test from a specific file, run:
Expand Down
5 changes: 4 additions & 1 deletion docs/faq.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,7 @@ If after flashing `maixpy_amigo_tft` to your device you notice that the buttons
Starting from version 23.09.0, Krux supports SD card hot plugging. If you are using older versions, it may only detect the SD card at boot, so make sure Krux is turned off when inserting the microSD into it. To test the card compatibility use Krux [Tools>Check SD Card](getting-started/features/tools.md/#check-sd-card).
Make sure the SD card is using MBR/DOS partition table and FAT32 format.

Here is some [supported microSD cards](https://github.com/m5stack/m5-docs/blob/master/docs/en/core/m5stickv.md#tf-cardmicrosd-test), and here is the MaixPy FAQ explaining [Why my micro SD card cannot be read](https://wiki.sipeed.com/soft/maixpy/en/others/maixpy_faq.html#Micro-SD-card-cannot-be-read).
Here is some [supported microSD cards](https://github.com/m5stack/m5-docs/blob/master/docs/en/core/m5stickv.md#tf-cardmicrosd-test), and here is the MaixPy FAQ explaining [Why my micro SD card cannot be read](https://wiki.sipeed.com/soft/maixpy/en/others/maixpy_faq.html#Micro-SD-card-cannot-be-read).

## Why insert an SD card into my device? What is it for? Does it save something?
SD card use is optional, most people use Krux only with QR codes. But you can use SD card to to upgrade the firmware, save settings, cnc/file, QR codes, XPUBs, encrypted mnemonics, and to save and load PSBTs, messages and wallet output descriptors.
9 changes: 7 additions & 2 deletions docs/getting-started/usage/generating-a-mnemonic.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,13 @@ Note: For 12-word mnemonics, only the first half of the SHA256 hash is used (128

<div style="clear: both"></div>

### How to verify

Don't trust, verify. We encourage you not to trust any claim you cannot verify yourself. Therefore, there are wallets that use compatible algorithms to calculate the entropy derived from dice rolls. You can use the [SeedSigner](https://seedsigner.com/) or Coldcard hardware wallets, or even the [Bitcoiner Guide website](https://bitcoiner.guide/seed/), they share the same logic that Krux uses and will give the same mnemonic.

## Alternatives
See [here](https://vault12.com/securemycrypto/cryptocurrency-security-how-to/seed-phrase-creation/) for good methods to generate a mnemonic manually, or visit [Ian Coleman's BIP-39 Tool](https://iancoleman.io/bip39/) offline or on an airgapped device to generate one automatically.

It's worth noting that Ian's tool is able to take a mnemonic and generate a QR code that Krux can read in via the QR input method mentioned on the next page.
You can use any other offline airgapped devices to generate your mnemonic. If you want to use a regular PC, a common strategy is to boot the PC using [Tails](https://tails.boum.org/) from a USB stick, without connecting the device to the internet, and then use a copy of the the [Bitcoiner Guide website](https://bitcoiner.guide/seed/) or even [Ian Coleman's BIP-39 Tool](https://iancoleman.io/bip39/). It's worth noting that both generate a QR code that Krux can read via the QR input method mentioned on the next page (Loading a Mnemonic).

See [here](https://vault12.com/securemycrypto/cryptocurrency-security-how-to/seed-phrase-creation/) for other good methods to generate a mnemonic manually.

2 changes: 1 addition & 1 deletion docs/getting-started/usage/navigating-the-main-menu.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The encrypted mnemonic will be converted to a QR code. When you scan this QR cod
<img src="../../../img/maixpy_m5stickv/extended-public-key-wsh-xpub-text-125.png" align="right">
<img src="../../../img/maixpy_amigo_tft/extended-public-key-wsh-xpub-text-150.png" align="right">

This option displays your master extended public key (xpub) as text as well as a QR code.
This option displays your master extended public key (xpub) as text as well as a QR code. The extended public key (xpub) can also be stored on a SD card if available.

After the xpub, a zpub or Zpub is shown depending on if a single-sig or multisig wallet was chosen. This z/Zpub is usually not necessary unless you are using a wallet coordinator that either cannot parse or ignores [key origin information in key expressions](https://github.com/bitcoin/bips/blob/master/bip-0380.mediawiki#Key_Expressions).

Expand Down
2 changes: 1 addition & 1 deletion firmware/MaixPy
Submodule MaixPy updated 36 files
+1 −0 .gitattributes
+3 −4 .gitmodules
+2 −2 build.md
+16 −20 components/drivers/flash/include/w25qxx.h
+55 −2 components/drivers/flash/src/w25qxx.c
+20 −4 components/drivers/lcd/src/lcd_mcu.c
+2 −2 components/drivers/lcd/src/lcd_rgb.c
+3 −3 components/kendryte_sdk/src/sipeed_sk9822.c
+5 −0 components/micropython/CMakeLists.txt
+4 −0 components/micropython/Kconfig
+36 −2 components/micropython/port/builtin_py/_boot.py
+12 −0 components/micropython/port/builtin_py/ide_debug.py
+7 −0 components/micropython/port/include/mpconfigport.h
+6 −3 components/micropython/port/src/flash/flash.c
+76 −62 components/micropython/port/src/omv/ov5640.c
+126 −0 components/micropython/port/src/omv/py/py_lcd.c
+1 −1 components/micropython/port/src/qrcode
+4 −0 components/micropython/port/src/shannon/micropython.mk
+113 −0 components/micropython/port/src/shannon/shannon.c
+20 −10 components/micropython/port/src/standard_lib/network/wiznet5k/modnwwiznet5k.c
+16 −4 components/micropython/port/src/standard_lib/socket/modusocket.c
+102 −151 projects/maixpy_amigo_ips/builtin_py/pmu.py
+277 −1 projects/maixpy_amigo_ips/compile/overrides/components/micropython/port/src/omv/img/font.c
+1 −0 projects/maixpy_amigo_ips/config_defaults.mk
+102 −151 projects/maixpy_amigo_tft/builtin_py/pmu.py
+277 −1 projects/maixpy_amigo_tft/compile/overrides/components/micropython/port/src/omv/img/font.c
+1 −0 projects/maixpy_amigo_tft/config_defaults.mk
+185 −5 projects/maixpy_bit/compile/overrides/components/micropython/port/src/omv/img/font.c
+1 −0 projects/maixpy_bit/config_defaults.mk
+185 −5 projects/maixpy_dock/compile/overrides/components/micropython/port/src/omv/img/font.c
+1 −0 projects/maixpy_dock/config_defaults.mk
+179 −176 projects/maixpy_m5stickv/builtin_py/pmu.py
+185 −5 projects/maixpy_m5stickv/compile/overrides/components/micropython/port/src/omv/img/font.c
+1 −0 projects/maixpy_m5stickv/config_defaults.mk
+185 −5 projects/maixpy_yahboom/compile/overrides/components/micropython/port/src/omv/img/font.c
+1 −0 projects/maixpy_yahboom/config_defaults.mk
6 changes: 3 additions & 3 deletions firmware/font/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Updating the built-in font
Krux uses a [custom fork](https://github.com/bachan/terminus-font-vietnamese) of the [Terminus](http://terminus-font.sourceforge.net/) font for its glyphs that includes Vietnamese characters, the Bitcoin currency symbol (₿) and the Pokémon Dollar symbol (₽ with 2 horizontal lines).
Krux uses a [custom fork](https://github.com/bachan/terminus-font-vietnamese) of the [Terminus](http://terminus-font.sourceforge.net/) font for its glyphs that includes Vietnamese characters, the Bitcoin currency symbol (₿) and custom icons.

To rebuild the font for all devices, run:
```
./bdftokff.sh ter-u14n 8 14 > m5stickv.kff
./bdftokff.sh ter-u16n 8 16 > bit_dock.kff
./bdftokff.sh ter-u16n 8 16 > bit_dock_yahboom.kff
./bdftokff.sh ter-u24b 12 24 > amigo.kff
```

Once you have a `.kff` file, locate the project that you want to use the updated font under `firmware/MaixPy/projects/` (`maixpy_amigo_tft/` for ex.), open its `compile/overrides/components/micropython/port/src/omv/img/font.c` file and replace the array contents in the `unicode` variable with the byte array found within the `.kff` file, then rebuild the firmware.
Once you have `.kff` files, for each project that you want to use the updated fonts, edit `../MaixPy/projects/*/compile/overrides/components/micropython/port/src/omv/img/font.c` (substituting `maixpy_amigo_tft` for `*` if only for an amigo) and replace the array contents in the `unicode` variable with the byte array found within the appropriate `.kff` file, then rebuild the firmware.

# How it works
Krux uses bitmap fonts that are custom-built for each device it runs on. The format that the firmware expects fonts to be in is a custom format referred to as "krux font format," or `.kff`.
Expand Down
Binary file added firmware/font/font_icons/Derivation_amigo.pbm
Binary file not shown.
4 changes: 4 additions & 0 deletions firmware/font/font_icons/Derivation_bit_dock_yahboom.pbm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
P4
# Created by GIMP version 2.10.34 PNM plug-in
8 16
ðððð`dffd`df
4 changes: 4 additions & 0 deletions firmware/font/font_icons/Derivation_m5stickv.pbm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
P4
# Created by GIMP version 2.10.34 PNM plug-in
8 14
ðððôffd`df
Binary file added firmware/font/font_icons/Fingerprint_amigo.pbm
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions firmware/font/font_icons/Fingerprint_m5stickv.pbm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
P4
# Created by GIMP version 2.10.34 PNM plug-in
8 14
<fyͅ­¹ƒî8ƒæ<
66 changes: 66 additions & 0 deletions firmware/font/font_icons/pbm2bdf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# The MIT License (MIT)

# Copyright (c) 2021-2023 Krux contributors

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

# Convert pbm files to bdf format
# Draw pbm files in gimp and use them as glyphs
# Usage: python pbm2bdf.py Derivation_Amigo.pbm 21B3
# Where 21B3 is the target codepoint, ex U+21B3
# Copy the output to the bdf file

import sys

code_point_hex = None
try:
pbm_file = sys.argv[1]
code_point_hex = sys.argv[2]
except Exception as e:
print("Not enough arguments")
exit()
try:
with open(pbm_file, "rb") as f:
lines = f.read().split(b"\n")
popped = 0
for i in range(len(lines)):
if lines[i - popped].startswith(b"#"):
lines.pop(i - popped)
popped += 1
dimensions = lines[1].split(b" ")
width = int(dimensions[0].decode())
bytes_width = (width + 7) // 8
height = int(dimensions[1].decode())

except Exception as e:
print(e, "Failed to read file")
exit()
print("STARTCHAR U+" + code_point_hex.upper())
print("ENCODING " + str(int(code_point_hex, 16)))
print("SWIDTH 1000 0")
print("DWIDTH " + str(width) + " 0")
print("BBX " + str(width) + " " + str(height) + " 0 0")
print("BITMAP")

for i in range(len(lines[2]) // bytes_width):
line_bytes = ""
for j in range(bytes_width):
line_bytes += "%0.2X" % lines[2][i * bytes_width + j]
print(line_bytes)
print("ENDCHAR")
63 changes: 44 additions & 19 deletions firmware/font/ter-u14n.bdf
Original file line number Diff line number Diff line change
Expand Up @@ -29993,27 +29993,10 @@ BITMAP
04
78
ENDCHAR
STARTCHAR U+20BD
ENCODING 8381
SWIDTH 571 0
DWIDTH 8 0
BBX 8 11 0 -1
BITMAP
3E
21
21
21
3E
20
FC
20
FC
20
20
ENDCHAR

STARTCHAR U+20BF
ENCODING 8383
SWIDTH 500 0
SWIDTH 1000 0
DWIDTH 8 0
BBX 8 14 0 -2
BITMAP
Expand All @@ -30032,4 +30015,46 @@ FE
28
28
ENDCHAR
STARTCHAR U+21B3
ENCODING 8627
SWIDTH 1000 0
DWIDTH 8 0
BBX 8 14 0 0
BITMAP
F0
F0
F0
F4
66
7F
66
64
60
64
66
7F
06
04
ENDCHAR
STARTCHAR U+229A
ENCODING 8858
SWIDTH 1000 0
DWIDTH 8 0
BBX 8 14 0 0
BITMAP
3C
66
03
79
CD
85
AD
B9
83
EE
38
83
E6
3C
ENDCHAR
ENDFONT
64 changes: 46 additions & 18 deletions firmware/font/ter-u16n.bdf
Original file line number Diff line number Diff line change
Expand Up @@ -32707,24 +32707,6 @@ BITMAP
04
78
ENDCHAR
STARTCHAR U+20BD
ENCODING 8381
SWIDTH 500 0
DWIDTH 8 0
BBX 8 11 0 -1
BITMAP
3E
21
21
21
3E
20
FC
20
FC
20
20
ENDCHAR
STARTCHAR U+20BF
ENCODING 8383
SWIDTH 500 0
Expand All @@ -32746,4 +32728,50 @@ FE
28
28
ENDCHAR
STARTCHAR U+21B3
ENCODING 8627
SWIDTH 1000 0
DWIDTH 8 0
BBX 8 16 0 0
BITMAP
F0
F0
F0
F0
60
64
66
7F
66
64
60
64
66
7F
06
04
ENDCHAR
STARTCHAR U+229A
ENCODING 8858
SWIDTH 1000 0
DWIDTH 8 0
BBX 8 16 0 -2
BITMAP
00
3C
66
03
79
CD
85
AD
B9
83
EE
38
83
E6
3C
00
ENDCHAR
ENDFONT
Loading
Loading