Review feedback including NO_BRIGHTNESS_COMMAND macro
This commit is contained in:
parent
b9b9ef227f
commit
1d1b8703b6
13
locale/ID.po
13
locale/ID.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -312,6 +312,10 @@ msgstr ""
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Kedua pin harus mendukung hardware interrut"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr ""
|
||||
@ -443,8 +447,11 @@ msgstr "Clock unit sedang digunakan"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr ""
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -308,6 +308,10 @@ msgstr ""
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr ""
|
||||
@ -433,8 +437,11 @@ msgstr ""
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr ""
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: Pascal Deneaux\n"
|
||||
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
|
||||
@ -312,6 +312,10 @@ msgstr "Bit depth muss ein Vielfaches von 8 sein."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Beide pins müssen Hardware Interrupts unterstützen"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "Die Helligkeit muss zwischen 0 und 255 liegen"
|
||||
@ -437,8 +441,11 @@ msgstr "Clock unit wird benutzt"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "Der Befehl muss ein int zwischen 0 und 255 sein"
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -308,6 +308,10 @@ msgstr ""
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr ""
|
||||
@ -433,8 +437,11 @@ msgstr ""
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr ""
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: @sommersoft, @MrCertainly\n"
|
||||
@ -312,6 +312,10 @@ msgstr ""
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr ""
|
||||
@ -437,8 +441,11 @@ msgstr ""
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr ""
|
||||
|
||||
|
13
locale/es.po
13
locale/es.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -316,6 +316,10 @@ msgstr "Bits depth debe ser múltiplo de 8."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Ambos pines deben soportar interrupciones por hardware"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "El brillo debe estar entro 0 y 255"
|
||||
@ -441,8 +445,11 @@ msgstr "Clock unit está siendo utilizado"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr "Entrada de columna debe ser digitalio.DigitalInOut"
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "Command debe estar entre 0 y 255."
|
||||
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
|
||||
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
|
||||
"Language-Team: fil\n"
|
||||
@ -314,6 +314,10 @@ msgstr "Bit depth ay dapat multiple ng 8."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "Ang liwanag ay dapat sa gitna ng 0 o 255"
|
||||
@ -441,8 +445,11 @@ msgstr "Clock unit ginagamit"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
#, fuzzy
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "Sa gitna ng 0 o 255 dapat ang bytes."
|
||||
|
13
locale/fr.po
13
locale/fr.po
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2019-04-14 20:05+0100\n"
|
||||
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
|
||||
"Language-Team: fr\n"
|
||||
@ -319,6 +319,10 @@ msgstr "La profondeur de bit doit être un multiple de 8."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Les deux entrées doivent supporter les interruptions matérielles"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "La luminosité doit être entre 0 et 255"
|
||||
@ -447,8 +451,11 @@ msgstr "Horloge en cours d'utilisation"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut"
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
#, fuzzy
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "La commande doit être un entier entre 0 et 255"
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
|
||||
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
|
||||
"Language-Team: \n"
|
||||
@ -314,6 +314,10 @@ msgstr "La profondità di bit deve essere multipla di 8."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Entrambi i pin devono supportare gli interrupt hardware"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "La luminosità deve essere compreso tra 0 e 255"
|
||||
@ -442,8 +446,11 @@ msgstr "Unità di clock in uso"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
#, fuzzy
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "I byte devono essere compresi tra 0 e 255"
|
||||
|
13
locale/pl.po
13
locale/pl.po
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2019-03-19 18:37-0700\n"
|
||||
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
|
||||
"Language-Team: pl\n"
|
||||
@ -311,6 +311,10 @@ msgstr "Głębia musi być wielokrotnością 8."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Obie nóżki muszą wspierać przerwania sprzętowe"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "Jasność musi być pomiędzy 0 a 255"
|
||||
@ -436,8 +440,11 @@ msgstr "Jednostka zegara w użyciu"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr "Kolumny muszą być typu digitalio.DigitalInOut"
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "Komenda musi być int pomiędzy 0 a 255"
|
||||
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
@ -311,6 +311,10 @@ msgstr ""
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Ambos os pinos devem suportar interrupções de hardware"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "O brilho deve estar entre 0 e 255"
|
||||
@ -438,8 +442,11 @@ msgstr "Unidade de Clock em uso"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
#, fuzzy
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "Os bytes devem estar entre 0 e 255."
|
||||
|
@ -7,7 +7,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: circuitpython-cn\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-07-19 16:09-0700\n"
|
||||
"POT-Creation-Date: 2019-07-19 16:10-0700\n"
|
||||
"PO-Revision-Date: 2019-04-13 10:10-0700\n"
|
||||
"Last-Translator: hexthat\n"
|
||||
"Language-Team: Chinese Hanyu Pinyin\n"
|
||||
@ -312,6 +312,10 @@ msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng."
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
msgstr "Liǎng gè yǐn jiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn"
|
||||
|
||||
#: shared-bindings/displayio/Display.c
|
||||
msgid "Brightness must be 0-1.0"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/supervisor/__init__.c
|
||||
msgid "Brightness must be between 0 and 255"
|
||||
msgstr "Liàngdù bìxū jiè yú 0 dào 255 zhī jiān"
|
||||
@ -437,8 +441,11 @@ msgstr "Shǐyòng shízhōng dānwèi"
|
||||
msgid "Column entry must be digitalio.DigitalInOut"
|
||||
msgstr "Liè tiáomù bìxū shì digitalio.DigitalInOut"
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
|
||||
#: shared-bindings/displayio/ParallelBus.c
|
||||
#: shared-bindings/displayio/I2CDisplay.c
|
||||
msgid "Command must be 0-255"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
|
||||
msgid "Command must be an int between 0 and 255"
|
||||
msgstr "Mìnglìng bìxū shì 0 dào 255 zhī jiān de int"
|
||||
|
||||
|
@ -100,7 +100,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA00,
|
||||
0x100, // Brightness command. Only available when <= 0xff
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness (ignored)
|
||||
true, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -102,7 +102,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA01, // backlight pin
|
||||
0x100, // no brightness command
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness (ignored)
|
||||
true, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -80,7 +80,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA01, // backlight pin
|
||||
0x100, // brightness command, only valid <= 0xff
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness (ignored)
|
||||
true, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -102,7 +102,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA01, // backlight pin
|
||||
0x100, // Brightness command. Only available when < 0xff
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness (ignored)
|
||||
true, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -80,7 +80,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PA01, // backlight pin
|
||||
0x100, // Brightness command. Only available when < 0xff
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness (ignored)
|
||||
true, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -92,7 +92,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
&pin_PB31, // Backlight pin
|
||||
0x100, // Brightness command > 0xff is none s
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness (ignored)
|
||||
true, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -100,7 +100,7 @@ void board_init(void) {
|
||||
display_init_sequence,
|
||||
sizeof(display_init_sequence),
|
||||
NULL,
|
||||
0x100, // brightness command. Only valid <=0xff
|
||||
NO_BRIGHTNESS_COMMAND,
|
||||
1.0f, // brightness
|
||||
false, // auto_brightness
|
||||
false, // single_byte_bounds
|
||||
|
@ -62,6 +62,8 @@ STATIC mp_obj_t displayio_colorconverter_make_new(const mp_obj_type_t *type, siz
|
||||
|
||||
//| .. method:: convert(color)
|
||||
//|
|
||||
//| Converts the given RGB888 color to RGB565
|
||||
//|
|
||||
STATIC mp_obj_t displayio_colorconverter_obj_convert(mp_obj_t self_in, mp_obj_t color_obj) {
|
||||
displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
||||
|
@ -34,6 +34,6 @@
|
||||
extern const mp_obj_type_t displayio_colorconverter_type;
|
||||
|
||||
void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self);
|
||||
bool common_hal_displayio_colorconverter_convert(displayio_colorconverter_t *colorconverter, const _displayio_colorspace_t* colorspace, uint32_t input_color, uint32_t* output_color);
|
||||
void common_hal_displayio_colorconverter_convert(displayio_colorconverter_t *colorconverter, const _displayio_colorspace_t* colorspace, uint32_t input_color, uint32_t* output_color);
|
||||
|
||||
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DISPLAYIO_COLORCONVERTER_H
|
||||
|
@ -119,7 +119,7 @@ STATIC mp_obj_t displayio_display_make_new(const mp_obj_type_t *type, size_t n_a
|
||||
{ MP_QSTR_write_ram_command, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x2c} },
|
||||
{ MP_QSTR_set_vertical_scroll, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x0} },
|
||||
{ MP_QSTR_backlight_pin, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} },
|
||||
{ MP_QSTR_brightness_command, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0x100} },
|
||||
{ MP_QSTR_brightness_command, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = NO_BRIGHTNESS_COMMAND} },
|
||||
{ MP_QSTR_brightness, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_OBJ_NEW_SMALL_INT(1)} },
|
||||
{ MP_QSTR_auto_brightness, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
|
||||
{ MP_QSTR_single_byte_bounds, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
|
||||
@ -242,10 +242,14 @@ STATIC mp_obj_t displayio_display_obj_get_brightness(mp_obj_t self_in) {
|
||||
}
|
||||
MP_DEFINE_CONST_FUN_OBJ_1(displayio_display_get_brightness_obj, displayio_display_obj_get_brightness);
|
||||
|
||||
STATIC mp_obj_t displayio_display_obj_set_brightness(mp_obj_t self_in, mp_obj_t brightness) {
|
||||
STATIC mp_obj_t displayio_display_obj_set_brightness(mp_obj_t self_in, mp_obj_t brightness_obj) {
|
||||
displayio_display_obj_t *self = native_display(self_in);
|
||||
common_hal_displayio_display_set_auto_brightness(self, false);
|
||||
bool ok = common_hal_displayio_display_set_brightness(self, mp_obj_get_float(brightness));
|
||||
mp_float_t brightness = mp_obj_get_float(brightness_obj);
|
||||
if (brightness < 0 || brightness > 1.0) {
|
||||
mp_raise_ValueError(translate("Brightness must be 0-1.0"));
|
||||
}
|
||||
bool ok = common_hal_displayio_display_set_brightness(self, brightness);
|
||||
if (!ok) {
|
||||
mp_raise_RuntimeError(translate("Brightness not adjustable"));
|
||||
}
|
||||
|
@ -36,6 +36,8 @@ extern const mp_obj_type_t displayio_display_type;
|
||||
|
||||
#define DELAY 0x80
|
||||
|
||||
#define NO_BRIGHTNESS_COMMAND 0x100
|
||||
|
||||
void common_hal_displayio_display_construct(displayio_display_obj_t* self,
|
||||
mp_obj_t bus, uint16_t width, uint16_t height,
|
||||
int16_t colstart, int16_t rowstart, uint16_t rotation, uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row,
|
||||
|
@ -103,7 +103,7 @@ STATIC mp_obj_t displayio_i2cdisplay_make_new(const mp_obj_type_t *type, size_t
|
||||
STATIC mp_obj_t displayio_i2cdisplay_obj_send(mp_obj_t self, mp_obj_t command_obj, mp_obj_t data_obj) {
|
||||
mp_int_t command_int = MP_OBJ_SMALL_INT_VALUE(command_obj);
|
||||
if (!MP_OBJ_IS_SMALL_INT(command_obj) || command_int > 255 || command_int < 0) {
|
||||
mp_raise_ValueError(translate("Command must be an int between 0 and 255"));
|
||||
mp_raise_ValueError(translate("Command must be 0-255"));
|
||||
}
|
||||
uint8_t command = command_int;
|
||||
mp_buffer_info_t bufinfo;
|
||||
|
@ -74,7 +74,7 @@ STATIC mp_obj_t displayio_palette_make_new(const mp_obj_type_t *type, size_t n_a
|
||||
STATIC mp_obj_t group_unary_op(mp_unary_op_t op, mp_obj_t self_in) {
|
||||
displayio_palette_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
switch (op) {
|
||||
case MP_UNARY_OP_BOOL: return mp_obj_new_bool(true);
|
||||
case MP_UNARY_OP_BOOL: return mp_const_true;
|
||||
case MP_UNARY_OP_LEN:
|
||||
return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_palette_get_len(self));
|
||||
default: return MP_OBJ_NULL; // op not supported
|
||||
|
@ -57,8 +57,8 @@ bool displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d
|
||||
return false;
|
||||
}
|
||||
|
||||
bool common_hal_displayio_colorconverter_convert(displayio_colorconverter_t *self, const _displayio_colorspace_t* colorspace, uint32_t input_color, uint32_t* output_color) {
|
||||
return displayio_colorconverter_convert(self, colorspace, input_color, output_color);
|
||||
void common_hal_displayio_colorconverter_convert(displayio_colorconverter_t *self, const _displayio_colorspace_t* colorspace, uint32_t input_color, uint32_t* output_color) {
|
||||
displayio_colorconverter_convert(self, colorspace, input_color, output_color);
|
||||
}
|
||||
|
||||
// Currently no refresh logic is needed for a ColorConverter.
|
||||
|
@ -153,7 +153,8 @@ void common_hal_displayio_display_construct(displayio_display_obj_t* self,
|
||||
common_hal_pulseio_pwmout_never_reset(&self->backlight_pwm);
|
||||
}
|
||||
}
|
||||
if (!self->auto_brightness && (self->backlight_inout.base.type != &mp_type_NoneType || brightness_command <= 0xff)) {
|
||||
if (!self->auto_brightness && (self->backlight_inout.base.type != &mp_type_NoneType ||
|
||||
brightness_command != NO_BRIGHTNESS_COMMAND)) {
|
||||
common_hal_displayio_display_set_brightness(self, brightness);
|
||||
} else {
|
||||
self->current_brightness = -1.0;
|
||||
@ -258,7 +259,7 @@ bool common_hal_displayio_display_set_brightness(displayio_display_obj_t* self,
|
||||
} else if (self->backlight_inout.base.type == &digitalio_digitalinout_type) {
|
||||
common_hal_digitalio_digitalinout_set_value(&self->backlight_inout, brightness > 0.99);
|
||||
ok = true;
|
||||
} else if (self->brightness_command < 0x100) {
|
||||
} else if (self->brightness_command != NO_BRIGHTNESS_COMMAND) {
|
||||
ok = self->begin_transaction(self->bus);
|
||||
if (ok) {
|
||||
if (self->data_as_commands) {
|
||||
@ -315,17 +316,16 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, displ
|
||||
data_length = 0;
|
||||
}
|
||||
if (self->single_byte_bounds) {
|
||||
data[data_length] = x1 + self->colstart;
|
||||
data[data_length + 1] = x2 - 1 + self->colstart;
|
||||
data[data_length++] = x1 + self->colstart;
|
||||
data[data_length++] = x2 - 1 + self->colstart;
|
||||
data_length += 2;
|
||||
} else {
|
||||
x1 += self->colstart;
|
||||
x2 += self->colstart - 1;
|
||||
data[data_length] = x1 >> 8;
|
||||
data[data_length + 1] = x1 & 0xff;
|
||||
data[data_length + 2] = x2 >> 8;
|
||||
data[data_length + 3] = x2 & 0xff;
|
||||
data_length += 4;
|
||||
data[data_length++] = x1 >> 8;
|
||||
data[data_length++] = x1 & 0xff;
|
||||
data[data_length++] = x2 >> 8;
|
||||
data[data_length++] = x2 & 0xff;
|
||||
}
|
||||
self->send(self->bus, self->data_as_commands, data, data_length);
|
||||
|
||||
@ -337,17 +337,15 @@ void displayio_display_set_region_to_update(displayio_display_obj_t* self, displ
|
||||
data_length = 0;
|
||||
}
|
||||
if (self->single_byte_bounds) {
|
||||
data[data_length] = y1 + self->rowstart;
|
||||
data[data_length + 1] = y2 - 1 + self->rowstart;
|
||||
data_length += 2;
|
||||
data[data_length++] = y1 + self->rowstart;
|
||||
data[data_length++] = y2 - 1 + self->rowstart;
|
||||
} else {
|
||||
y1 += self->rowstart;
|
||||
y2 += self->rowstart - 1;
|
||||
data[data_length] = y1 >> 8;
|
||||
data[data_length + 1] = y1 & 0xff;
|
||||
data[data_length + 2] = y2 >> 8;
|
||||
data[data_length + 3] = y2 & 0xff;
|
||||
data_length += 4;
|
||||
data[data_length++] = y1 >> 8;
|
||||
data[data_length++] = y1 & 0xff;
|
||||
data[data_length++] = y2 >> 8;
|
||||
data[data_length++] = y2 & 0xff;
|
||||
}
|
||||
self->send(self->bus, self->data_as_commands, data, data_length);
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ typedef struct {
|
||||
bool needs_refresh;
|
||||
} displayio_palette_t;
|
||||
|
||||
// Returns false if color fetch did not succeed (out of range or transparent).
|
||||
// Returns true if color is opaque, and sets color.
|
||||
bool displayio_palette_get_color(displayio_palette_t *palette, const _displayio_colorspace_t* colorspace, uint32_t palette_index, uint32_t* color);
|
||||
bool displayio_palette_needs_refresh(displayio_palette_t *self);
|
||||
void displayio_palette_finish_refresh(displayio_palette_t *self);
|
||||
|
@ -379,7 +379,7 @@ bool displayio_tilegrid_fill_area(displayio_tilegrid_t *self, const _displayio_c
|
||||
// Compute the destination pixel in the buffer and mask based on the transformations.
|
||||
int16_t offset = row_start + (x - start_x + x_shift) * x_stride; // in pixels
|
||||
|
||||
// This is super useful for debugging out range accesses. Uncomment to use.
|
||||
// This is super useful for debugging out of range accesses. Uncomment to use.
|
||||
// if (offset < 0 || offset >= (int32_t) displayio_area_size(area)) {
|
||||
// asm("bkpt");
|
||||
// }
|
||||
|
Loading…
Reference in New Issue
Block a user