Skip to content

Commit 8918e74

Browse files
authored
Merge pull request #4 from tadeubas/develop
Develop
2 parents 288fc5b + 386da71 commit 8918e74

10 files changed

Lines changed: 816 additions & 16 deletions

File tree

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,6 @@ simulator/sd
7878
!tests/firmware-v0.0.0.bin
7979
!tests/firmware-v0.0.0.bin.badsig
8080
!tests/firmware-v0.0.0.bin.sha256.txt
81-
!tests/firmware-v0.0.0.bin.sig
81+
!tests/firmware-v0.0.0.bin.sig
82+
83+
src/kruxsim

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ Note that you can run `poetry install` after making a change to the krux code if
6060

6161
## Format code
6262
```bash
63-
poetry run black ./src && poetry run black ./tests
63+
poetry run black ./src
64+
poetry run black ./tests
6465
```
6566

6667
## Run pylint
@@ -122,6 +123,18 @@ sudo apt install libgl1
122123
# You are trying to run the simulator on a SO without a GUI (some kind of terminal only or WSL). Try one with GUI!
123124
```
124125

126+
Simulator sequences (automatic testing):
127+
```bash
128+
# Enter simulator folder:
129+
cd simulator
130+
131+
# Run all sequences of commands to all devices and all locales
132+
./generate-all-screenshots.sh
133+
134+
# Run a specific sequence for a specific device (need to have the screenshots and the sd folder with the file settings.json inside)
135+
poetry run python simulator.py --sequence sequences/about.txt --sd --device maixpy_m5stickv
136+
```
137+
125138
## Live debug a device
126139
If you've made a fresh build and flashed it to your device, you can connect to the device over serial connection with:
127140
```bash

i18n/translations/de-DE.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"Signature:\n\n%s": "Unterschrift:\n\n%s",
119119
"Single-key": "Single-key",
120120
"TX Pin": "TX Stift",
121-
"The settings.json file will keep the changes on the SD card.": "Die settings.json-Datei behält die Änderungen auf der SD-Karte.",
122121
"Thermal": "Thermisch",
123122
"Try more?": "Mehr versuchen?",
124123
"Unit": "Einheit",
@@ -137,5 +136,6 @@
137136
"Warning:\nIncomplete descriptor": "Warnung:\nUnvollständiger Deskriptor",
138137
"Word %d": "Wort %d",
139138
"Words": "Wörter",
140-
"Yes": "Ja"
139+
"Yes": "Ja",
140+
"Your changes will be kept on the SD card.": "Ihre Änderungen werden auf der SD-Karte gespeichert."
141141
}

i18n/translations/en-US.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"Signature:\n\n%s": "Signature:\n\n%s",
119119
"Single-key": "Single-key",
120120
"TX Pin": "TX Pin",
121-
"The settings.json file will keep the changes on the SD card.": "The settings.json file will keep the changes on the SD card.",
122121
"Thermal": "Thermal",
123122
"Try more?": "Try more?",
124123
"Unit": "Unit",
@@ -137,5 +136,6 @@
137136
"Warning:\nIncomplete descriptor": "Warning:\nIncomplete descriptor",
138137
"Word %d": "Word %d",
139138
"Words": "Words",
140-
"Yes": "Yes"
139+
"Yes": "Yes",
140+
"Your changes will be kept on the SD card.": "Your changes will be kept on the SD card."
141141
}

i18n/translations/es-MX.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"Signature:\n\n%s": "Firma:\n\n%s",
119119
"Single-key": "Single-key",
120120
"TX Pin": "TX Alfiler",
121-
"The settings.json file will keep the changes on the SD card.": "El archivo settings.json guardará los cambios en la tarjeta SD.",
122121
"Thermal": "Térmico",
123122
"Try more?": "¿Intentar con mas?",
124123
"Unit": "Unidad",
@@ -137,5 +136,6 @@
137136
"Warning:\nIncomplete descriptor": "Advertencia:\ndescriptor incompleto",
138137
"Word %d": "Palabra %d",
139138
"Words": "Palabras",
140-
"Yes": ""
139+
"Yes": "",
140+
"Your changes will be kept on the SD card.": "Sus cambios se guardarán en la tarjeta SD."
141141
}

i18n/translations/fr-FR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"Signature:\n\n%s": "Signature:\n\n%s",
119119
"Single-key": "Clé unique",
120120
"TX Pin": "TX Fiche",
121-
"The settings.json file will keep the changes on the SD card.": "Le fichier settings.json conservera les modifications sur la carte SD.",
122121
"Thermal": "Thermique",
123122
"Try more?": "Réessayer?",
124123
"Unit": "Unité",
@@ -137,5 +136,6 @@
137136
"Warning:\nIncomplete descriptor": "Avertissement :\nDescripteur incomplet",
138137
"Word %d": "Mot %d",
139138
"Words": "Mots",
140-
"Yes": "Oui"
139+
"Yes": "Oui",
140+
"Your changes will be kept on the SD card.": "Vos modifications seront conservées sur la carte SD."
141141
}

i18n/translations/pt-BR.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"Signature:\n\n%s": "Assinatura:\n\n%s",
119119
"Single-key": "Single-key",
120120
"TX Pin": "Pino TX",
121-
"The settings.json file will keep the changes on the SD card.": "O arquivo settings.json manterá suas alterações no cartão SD.",
122121
"Thermal": "Térmica",
123122
"Try more?": "Tentar mais?",
124123
"Unit": "Unidade",
@@ -137,5 +136,6 @@
137136
"Warning:\nIncomplete descriptor": "Cuidado:\nDescritor Incompleto",
138137
"Word %d": "Palavra %d",
139138
"Words": "Palavras",
140-
"Yes": "Sim"
139+
"Yes": "Sim",
140+
"Your changes will be kept on the SD card.": "Suas alterações serão mantidas no cartão SD."
141141
}

i18n/translations/vi-VN.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@
118118
"Signature:\n\n%s": "Chữ ký:\n\n%s",
119119
"Single-key": "Khóa đơn",
120120
"TX Pin": "TX Ghim",
121-
"The settings.json file will keep the changes on the SD card.": "Tệp settings.json sẽ giữ các thay đổi trên thẻ SD.",
122121
"Thermal": "Nhiệt",
123122
"Try more?": "Thử thêm nữa?",
124123
"Unit": "Đơn vị",
@@ -137,5 +136,6 @@
137136
"Warning:\nIncomplete descriptor": "Cảnh báo:\nMô tả không đầy đủ",
138137
"Word %d": "Kí tự %d",
139138
"Words": "Từ ngữ",
140-
"Yes": "Đúng"
139+
"Yes": "Đúng",
140+
"Your changes will be kept on the SD card.": "Các thay đổi của bạn sẽ được lưu trên thẻ SD."
141141
}

src/krux/pages/login.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
)
5050

5151
SENTINEL_DIGITS = "11111"
52+
SD_SETTINGS_MSG_DURATION = 2000
5253

5354
D6_STATES = [str(i + 1) for i in range(6)]
5455
D20_STATES = [str(i + 1) for i in range(20)]
@@ -531,15 +532,17 @@ def settings(self):
531532
# Check for SD hot-plug
532533
with SDHandler():
533534
self.ctx.display.flash_text(
534-
t("The settings.json file will keep the changes on the SD card."),
535+
t("Your changes will be kept on the SD card."),
535536
lcd.WHITE,
537+
duration=SD_SETTINGS_MSG_DURATION,
536538
)
537539
except:
538540
self.ctx.display.flash_text(
539541
t(
540542
"Incompatible or missing SD card:\n\nChanges will last until shutdown."
541543
),
542544
lcd.WHITE,
545+
duration=SD_SETTINGS_MSG_DURATION,
543546
)
544547

545548
return self.namespace(Settings())()

0 commit comments

Comments
 (0)