File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
126139If you've made a fresh build and flashed it to your device, you can connect to the device over serial connection with:
127140``` bash
Original file line number Diff line number Diff line change 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" ,
137136 "Warning:\n Incomplete descriptor" : " Warnung:\n Unvollstä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}
Original file line number Diff line number Diff line change 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" ,
137136 "Warning:\n Incomplete descriptor" : " Warning:\n Incomplete 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}
Original file line number Diff line number Diff line change 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" ,
137136 "Warning:\n Incomplete descriptor" : " Advertencia:\n descriptor incompleto" ,
138137 "Word %d" : " Palabra %d" ,
139138 "Words" : " Palabras" ,
140- "Yes" : " Sí"
139+ "Yes" : " Sí" ,
140+ "Your changes will be kept on the SD card." : " Sus cambios se guardarán en la tarjeta SD."
141141}
Original file line number Diff line number Diff line change 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é" ,
137136 "Warning:\n Incomplete descriptor" : " Avertissement :\n Descripteur 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}
Original file line number Diff line number Diff line change 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" ,
137136 "Warning:\n Incomplete descriptor" : " Cuidado:\n Descritor 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}
Original file line number Diff line number Diff line change 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ị" ,
137136 "Warning:\n Incomplete descriptor" : " Cảnh báo:\n Mô 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}
Original file line number Diff line number Diff line change 4949)
5050
5151SENTINEL_DIGITS = "11111"
52+ SD_SETTINGS_MSG_DURATION = 2000
5253
5354D6_STATES = [str (i + 1 ) for i in range (6 )]
5455D20_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 \n Changes will last until shutdown."
541543 ),
542544 lcd .WHITE ,
545+ duration = SD_SETTINGS_MSG_DURATION ,
543546 )
544547
545548 return self .namespace (Settings ())()
You can’t perform that action at this time.
0 commit comments