Skip to content

Commit

Permalink
Merge branch 'mpy-cross' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
odudex committed Mar 26, 2024
2 parents 6869d49 + d4a2d00 commit eb4dafa
Show file tree
Hide file tree
Showing 53 changed files with 92,536 additions and 92,219 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- main
- develop
pull_request:

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- uses: psf/black@stable
with:
options: "--check --verbose"
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: Validate translations
run: cd i18n && python3 i18n.py validate

Expand All @@ -76,7 +76,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
Expand All @@ -95,7 +95,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ simulator/krux-screenshots
simulator/screenshots
simulator/sd

!tests/firmware-v0.0.0.bin
!tests/firmware-v0.0.0.bin.badsig
!tests/firmware-v0.0.0.bin.sha256.txt
!tests/firmware-v0.0.0.bin.sig
# allow files: firmware.bin, .sig, .sha256.txt
!tests/*
!tests/files/*
37 changes: 16 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,33 +72,28 @@ RUN pip3 install pyserial==3.4
FROM build-base as build-software
ARG DEVICE="maixpy_m5stickv"
RUN mkdir /src
# COPY ./LICENSE.md /src/LICENSE.md
COPY ./firmware /src/firmware
COPY ./src /src/src
COPY ./vendor /src/vendor
WORKDIR /src
COPY ./LICENSE.md LICENSE.md
RUN mkdir build && \
cp LICENSE.md build/LICENSE.md
COPY ./vendor vendor
RUN cd vendor/embit && pip3 install -e .
RUN cp -r vendor/embit/src/embit build && \
rm -rf build/embit/util/prebuilt && \
rm -f build/embit/util/ctypes_secp256k1.py && \
rm -f build/embit/util/py_secp256k1.py && \
cp -r vendor/urtypes/src/urtypes build && \
cp -r vendor/foundation-ur-py/src/ur build
COPY ./firmware firmware
RUN cp -r firmware/MaixPy/projects/"${DEVICE}"/builtin_py/. build
COPY ./src src
RUN cp -r src/. build && \
find build -type f -name '*.py[co]' -delete && \
find build -type f -name '.DS_Store' -delete && \
find build -type d -name '__pycache__' -exec rm -rv {} + -depth && \
find build -type d -name '.pytest_cache' -exec rm -rv {} + -depth && \
find build -type d -name '*.egg-info' -exec rm -rv {} + -depth
RUN find /src/build -type f -name \*.py -exec sh -c "python3 ./firmware/scripts/minify.py {}" \;
RUN rm -rf vendor/embit/src/embit/util/prebuilt && \
rm -rf vendor/embit/src/embit/liquid && \
rm -f vendor/embit/src/embit/psbtview.py && \
rm -f vendor/embit/src/embit/slip39.py && \
rm -f vendor/embit/src/embit/wordlists/slip39.py && \
rm -f vendor/embit/src/embit/util/ctypes_secp256k1.py && \
rm -f vendor/embit/src/embit/util/py_secp256k1.py && \
mv src/boot.py src/_boot.py && \
cp -r src/. firmware/MaixPy/projects/"${DEVICE}"/builtin_py/ && \
cp -r vendor/embit/src/embit firmware/MaixPy/projects/"${DEVICE}"/builtin_py/ && \
cp -r vendor/urtypes/src/urtypes firmware/MaixPy/projects/"${DEVICE}"/builtin_py/ && \
cp -r vendor/foundation-ur-py/src/ur firmware/MaixPy/projects/"${DEVICE}"/builtin_py/

FROM build-software AS build-firmware
ARG DEVICE="maixpy_m5stickv"
WORKDIR /src/firmware/MaixPy
RUN python3 ./components/micropython/core/lib/memzip/make-memzip.py --zip-file ./components/micropython/port/memzip-files.zip --c-file ./components/micropython/port/memzip-files.c /src/build
RUN cp -rf projects/"${DEVICE}"/compile/overrides/. ./
RUN cd projects/"${DEVICE}" && \
python3 project.py clean && \
Expand Down
39 changes: 35 additions & 4 deletions docs/faq.en.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
## Why are the buttons on my Maix Amigo in the wrong order? Why is my Amigo screen displaying the wrong colors?
Some Amigo screens have inverted X coordinates while others don’t. If you notice that the buttons on keypad input screens appear to be in the wrong order, please go to `Settings > Hardware > Display` and change the value of `Flipped X Coordinates` which should correct the issue.
## Troubleshooting LCD Settings on Maix Amigo
### Buttons in the Wrong Order
If the buttons on keypad input screens appear to be in the wrong order, this might be due to inverted X coordinates. To correct this:

Others have found that there are issues with the colors displayed in the interface and camera preview. To fix this we have two options in `Settings > Hardware > Display`, `BGR Colors` and `Inverted Colors`, test with them until the colors appear to be correct on your device.
1. Go to Settings > Hardware > Display.
2. Change the value of Flipped X Coordinates.
### Incorrect Colors
If the colors displayed on the interface or camera preview are incorrect, you can try the following options:

#### Inverted Colors
If, for example, the background color is white when it should be black, go to Settings > Hardware > Display and toggle `Inverted Colors` .

#### BGR Colors
If, for example, you are using the Orange theme, and instead of orange the colors appear bluish, toggle `BGR Colors` in the display settings.

#### LCD Type
**Warning!** Only try changing this setting if you failed to fix colors with previous ones.

If adjusting `BGR Colors` and `Inverted Colors` doesn't fix the color issue, try changing the LCD Type:

1. After changing this setting, you will be warned that the device will reboot automatically if this change does not resolve the issue (if it fails, the screen will turn black, and you'll not see anything).
2. After proceeding with the warning, if you see a message prompting you to press the `PREVIOUS` (UP) button, it means that the new setting worked. Follow the instructions and press UP.
3. If you notice menu options but the colors are still wrong, try again with different combinations of `Inverted Colors` and `BGR Colors`. This time, it is likely you will find a combination that correctly displays the colors of themes and the camera feed.

If, after the warning in step 1, the screen turns black and you don't see anything, don't panic or press any buttons. Just wait 5 seconds, and the device will automatically reboot with the previous display settings. This means you should keep the default LCD Type setting and maybe try again with `Inverted Colors` and `BGR Colors`.

If you accidentally pressed `PREVIOUS` (UP) and saved the wrong setting, you will have to perform a wipe to remove all stored settings to be able to see the screen working again. On Linux, go to the folder where you downloaded the Krux firmware and use Ktool to fully wipe your device:

`./ktool-linux -B goE -b 1500000 -E`

(Soon Krux-Installer will have a full wipe button too)

Then flash the fimrware again.

`./ktool-linux -B goE -b 1500000 maixpy_amigo/kboot.kfpkg`

## Why doesn't my Maix Amigo touchscreen work with v24.03.0 if it worked fine with v23.09.1?
<img src="../img/amigo-inside-switch-up.jpg" align="right">
Expand Down Expand Up @@ -67,7 +98,7 @@ The level of detail that you see is what Krux sees. If the QR code shown on the

If you have adjusted the lens already, the device may be too far away or too close to the code to read it. Start by holding the device as close to the QR code as possible and pulling away slowly until all or most of the QR code is viewable within the screen. If the code on the screen looks crisp, Krux should read it quickly and give you immediate feedback.

If you are in a dark environment, you can hold down the ENTER button of the M5StickV or Maix Amigo to turn on their LED light to potentially increase visibility. M5stickV and Amigo also has an anti-glare mode to better capture images from high brightness screens or with incident light, to enable/disable the anti-glare just press the PAGE button while scanning.
If you are in a dark environment, you can hold down the `ENTER` button of the M5StickV or Maix Amigo to turn on their LED light to potentially increase visibility. M5stickV and Amigo also has an anti-glare mode to better capture images from high brightness screens or with incident light, to enable/disable the anti-glare just press the PAGE button while scanning.

## Why am I getting an error when I try to scan a QR code?
If Krux is recognizing that it sees a QR code but is displaying an error message after reading it, the likely reason is that the QR code is not in a format that Krux works with. We have listed the supported formats below:
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/settings.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The caveat is low values can cause issues, such as double step and unexpected mo
#### Display (Maix Amigo only)
<img src="../../img/maixpy_amigo/settings-options-hardware-display-150.png" align="right">

Some Maix Amigo screens are different, here you can customize the BGR Colors, Flipped X Coordinates and Inverted Colors. For more info see [FAQ](../faq.md/#why-are-the-buttons-on-my-amigo-in-the-wrong-order-why-is-my-amigo-screen-displaying-the-wrong-colors)
Some Maix Amigo screens are different, here you can customize the BGR Colors, Flipped X Coordinates, Inverted Colors and LCD Type. For more info see [FAQ](../faq.md/#why-are-the-buttons-on-my-amigo-in-the-wrong-order-why-is-my-amigo-screen-displaying-the-wrong-colors)

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

Expand Down
29 changes: 18 additions & 11 deletions i18n/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"%s\n\nwas NOT FOUND in the first %d receive addresses": "%s\n\nwurde in den ersten %d Empfangsadressen NICHT GEFUNDEN",
"%s was removed from SD card": "%s wurde von der SD-Karte gelöscht",
"%s was removed from flash": "%s wurde aus dem Flash-Speicher gelöscht",
"(%d total)\n\n": "(%d insgesamt)\n\n",
"(%d total)": "(%d insgesamt)",
"(Experimental)": "(Experimental)",
"12 words": "12 Wörter",
"24 words": "24 Wörter",
Expand All @@ -29,10 +29,13 @@
"Back": "Zurück",
"Back to Menu": "Zurück zum Menü",
"Backing up bootloader..\n\n%d%%": "Bootloader wird gesichert..\n\n%d%%",
"Backup Mnemonic": "Mnemonik-Backup",
"Bad signature": "Ungültige Signatur",
"Baudrate": "Baudrate",
"Bitcoin": "Bitcoin",
"Border Padding": "Randpolsterung",
"Buttons": "Tasten",
"Buttons Debounce": "Entprellung der Tasten",
"CNC": "CNC",
"Calculating Shannon's entropy": "Berechnung der Shannon-Entropie",
"Capture cancelled": "Aufnahme abgebrochen",
Expand Down Expand Up @@ -66,9 +69,7 @@
"Do not power off, it may take a while to complete.": "Schalten Sie das Gerät nicht aus, es kann eine Weile dauern.",
"Done?": "Fertig?",
"Driver": "Driver",
"Encoder": "Encoder",
"Encoder Debounce": "Encoder-Entprellung",
"Encrypt Mnemonic": "Verschlüssel Mnemonic",
"Encrypted": "Verschlüsselt",
"Encrypted QR Code": "Verschlüsselter QR-Code",
"Encrypted mnemonic was not stored": "Verschlüsselte Mnemonic wurde nicht gespeichert",
"Encrypted mnemonic was stored with ID: ": "Speicherung der verschlüsselten Mnemonic mit ID: ",
Expand Down Expand Up @@ -114,6 +115,7 @@
"ID already exists\n": "ID existiert bereits\n",
"Incomplete output descriptor": "Unvollständiger Ausgabedeskriptor",
"Inputs (%d): ": "Input (%d): ",
"Install?": "Installieren?",
"Insufficient Entropy!": "Unzureichende Entropie!",
"Insufficient entropy": "Unzureichende Entropie",
"Invalid address": "Ungültige Adresse",
Expand All @@ -128,6 +130,7 @@
"Key: ": "Schlüssel:",
"Krux\n\n\nVersion\n%s": "Krux\n\n\nVersion\n%s",
"Krux Printer Test QR": "Krux Drucker Test-QR",
"LCD Type": "LCD-Typ",
"Language": "Sprache",
"Leave blank if you'd like Krux to pick a valid final word": "Lassen Sie das Feld leer, wenn Sie möchten, dass Krux ein gültiges letztes Wort auswählt",
"Left": "Links",
Expand Down Expand Up @@ -158,12 +161,14 @@
"Multisig": "Multisig",
"Network": "Netzwerk",
"New Mnemonic": "Neue Mnemonic",
"New firmware detected.\n\nSHA256:\n%s\n\n\n\nInstall?": "Neue Firmware erkannt.\n\nSHA256:\n%s\n\n\n\nInstallieren?",
"New firmware detected on SD card.": "Neue Firmware auf SD-Karte erkannt.",
"New firmware detected.": "Neue Firmware erkannt.",
"No": "Nein",
"No BIP39 passphrase": "Keine BIP39 Passphrase",
"Not enough rolls!": "Nicht genug Würfe!",
"Numbers": "Zahlen",
"Octal": "Oktal",
"Other Formats": "Andere Formate",
"PBKDF2 Iter.": "PBKDF2-Iter.",
"PSBT": "PSBT",
"Paint punched dots black so they can be detected.": "Male gestanzte Punkte schwarz an, damit sie erkannt werden können.",
Expand All @@ -174,16 +179,17 @@
"Passphrase: ": "Passphrase:",
"Permanently remove all stored encrypted mnemonics and settings from flash?": "Alle gespeicherten verschlüsselten Mnemoniken und Einstellungen dauerhaft vom Flash-Speicher entfernen?",
"Persist": "Speicher",
"Pixels deviation index: ": "Pixelabweichungsindex:",
"Pixels deviation index:": "Pixelabweichungsindex:",
"Plaintext QR": "Klartext-QR",
"Please load a wallet output descriptor": "Bitte lade einen Wallet Ausgabedeskriptor",
"Plunge Rate": "Tauchrate",
"Poor entropy": "Schlechte Entropie",
"Poor entropy detected. More rolls are recommended": "Schlechte Entropie erkannt. Mehr Würfe werden empfohlen",
"Print Test QR": "Drucke Test-QR",
"Print Tiny Seed?": "Tiny Seed drucken?",
"Print to QR": "Als QR-Code drucken",
"Print to QR?\n\n%s\n\n": "Als QR-Code drucken?\n\n%s\n\n",
"Print?\n\n%s\n\n": "Drucken?\n\n%s\n\n",
"Print to QR?": "Als QR-Code drucken?",
"Print?": "Drucken?",
"Printer": "Drucker",
"Printer Driver not set!": "Druckertreiber nicht gesetzt!",
"Printing\n%d / %d": "Drucken\n%d / %d",
Expand All @@ -198,6 +204,7 @@
"Region: ": "Region: ",
"Remove %s?": "Löschen %s?",
"Remove Mnemonic": "Mnemonic löschen",
"Remove firmware files from SD Card?": "Firmware-Dateien von der SD-Karte entfernen?",
"Res. - Format": "Res. - Format",
"Restore factory settings and reboot?": "Werkseinstellungen wiederherstellen und neu starten?",
"Return to QR Viewer": "Zurück zum QR-Viewer",
Expand Down Expand Up @@ -228,8 +235,7 @@
"SeedQR": "SeedQR",
"Self-transfer or Change (%d): ": "Selbstübertragung oder Change (%d): ",
"Settings": "Einstellungen",
"Shannon's Entropy: ": "Shannons Entropie:",
"Shannon's entropy:\n": "Shannons Entropie:\n",
"Shannon's Entropy:": "Shannons Entropie:",
"Shutdown": "Ausschalten",
"Shutting down..": "Herunterfahren..",
"Sign": "Signieren",
Expand Down Expand Up @@ -267,13 +273,14 @@
"Unexpected error saving to Flash.": "Unerwarteter Fehler beim Speichern auf dem Flash-Speicher.",
"Unit": "Einheit",
"Updating bootloader..\n\n%d%%": "Bootloader wird aktualisiert..\n\n%d%%",
"Upgrade complete.\n\nShutting down..": "Upgrade abgeschlossen.\n\nHerunterfahren..",
"Upgrade complete.": "Upgrade abgeschlossen.",
"Upgrading firmware..\n\n%d%%": "Firmware wird aktualisiert..\n\n%d%%",
"Use a black background surface.": "Verwende eine schwarze Hintergrundfläche.",
"Use camera's entropy to create a new mnemonic": "Verwende die Entropie der Kamera, um eine neue Mnemonic zu erstellen",
"Used: ": "Belegt: ",
"Value %s out of range: [%s, %s]": "Wert %S außerhalb des Bereichs: [ %s, %s]",
"Value must be multiple of %s": "Der Wert muss ein Vielfaches von %s sein",
"Verifying..": "Überprüfung..",
"Via Camera": "Via Kamera",
"Via D20": "Via D20",
"Via D6": "Via D6",
Expand Down
Loading

0 comments on commit eb4dafa

Please sign in to comment.