18469 Commits

Author SHA1 Message Date
Jeff Epler
f224ed1848 OnDiskBitmap: Correct handling of "0 color palette" images
Microsoft documentation says:

> If biCompression equals BI_RGB and the bitmap uses 8 bpp or less, the bitmap has a color table immediatelly following the BITMAPINFOHEADER structure. The color table consists of an array of RGBQUAD values. The size of the array is given by the biClrUsed member. If biClrUsed is zero, the array contains the maximum number of colors for the given bitdepth; that is, 2^biBitCount colors.

Formerly, we treated 0 colors as "no image palette" during construction,
but then during common_hal_displayio_ondiskbitmap_get_pixel indexed into
the palette anyway.  This could have unpredictable results.  On a pygamer,
it gave an image that was blue and black.  On magtag, it gave a crash.
2020-12-17 10:54:37 -06:00
Jeff Epler
28bd29eb42 displayio: ColorConverter: fix logic errors about transparent pixels
The transparent_color field was never initialized.  I _think_ this means
its value was always set to 0, or the blackest of blacks.  Instead,
initialize it to the sentinel value, newly given the name
NO_TRANSPARENT_COLOR.

This exposed a second problem: The test for whether there was an existing
transparent color was wrong (backwards).  I am guessing that this was not
found due to the first bug; since the converter had a transparent color,
the correct test would have led to always getting the error "Only one
color can be transparent at a time".

Closes #3723
2020-12-16 13:48:27 -06:00
Jeff Epler
f2204d7d88
Merge pull request #3828 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-12-15 19:53:04 -06:00
Hosted Weblate
2de9f18121
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-12-15 22:31:58 +01:00
Dan Halbert
a2d2d699e4
Merge pull request #3810 from hierophect/esp-analog-hang
ESP32-S2: Remove calloc in AnalogIn
2020-12-15 16:31:46 -05:00
hierophect
3ad4b12ce1
Merge branch 'main' into esp-analog-hang 2020-12-15 15:08:30 -05:00
Jeff Epler
afcc00fed4
Merge pull request #3771 from cwalther/exceptionprint
#3702 breaks printing an exception twice
2020-12-15 08:11:28 -06:00
Jeff Epler
b810b384c9
Merge pull request #3792 from weblate/weblate-circuitpython-main
Translations update from Weblate
2020-12-15 08:07:22 -06:00
Hosted Weblate
9fd652111a
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-12-15 02:40:11 +01:00
Hosted Weblate
f267c327bd
Merge branch 'origin/main' into Weblate. 2020-12-15 02:40:09 +01:00
Scott Shawcroft
d076296659
Merge pull request #3816 from dhalbert/sleepmemory
alarm.sleep_memory + alarm.wake_alarm
2020-12-14 17:40:02 -08:00
Hosted Weblate
2c4b1f251d
Merge branch 'origin/main' into Weblate. 2020-12-15 02:32:24 +01:00
Scott Shawcroft
d6ee17c6fd
Merge pull request #3817 from BennyE/reserve-pins-only-for-debug
esp32s2: Reserve UART pins only if DEBUG=1 is set to address issue 3811
2020-12-14 17:32:17 -08:00
Hosted Weblate
1bacfacfb3
Merge branch 'origin/main' into Weblate. 2020-12-15 02:11:24 +01:00
Scott Shawcroft
a1f773d9ed
Merge pull request #3819 from BennyE/issue3663
Fix for issue 3663 by returning early if no scan was started before s…
2020-12-14 17:11:18 -08:00
Hosted Weblate
b98da3d89f
Merge branch 'origin/main' into Weblate. 2020-12-15 02:09:44 +01:00
Scott Shawcroft
dc473b29e3
Merge pull request #3643 from hierophect/esp32-pin-reset
ESP32-S2: Add IDF pin resets to Microcontroller
2020-12-14 17:09:29 -08:00
Lucian Copeland
d793ec2872 Change pinfunc to default of 0 at reset 2020-12-14 14:25:38 -05:00
Lucian Copeland
cac755ba16 Merge remote-tracking branch 'upstream/main' into esp-analog-hang 2020-12-14 13:00:57 -05:00
Lucian Copeland
dc560f0eee translations 2020-12-14 13:00:07 -05:00
Lucian Copeland
f15e2d86c0 Reduce samples from 64 to 2 2020-12-14 12:59:20 -05:00
Dan Halbert
e0bb4a808a make translate 2020-12-14 11:49:01 -05:00
Dan Halbert
e0afa32cfa use RTC_DATA_ATTR; address review comments 2020-12-14 11:36:54 -05:00
Hosted Weblate
9acdd91c91
Merge branch 'origin/main' into Weblate. 2020-12-13 02:14:31 +01:00
Dan Halbert
6cced49402
Merge pull request #3820 from theacodes/bhb-v6
Update Big Honking Button configuration to support its newest board revision.
2020-12-12 20:14:19 -05:00
Thea Flowers
fe32dd08b8 Update Big Honking Button configuration to support its newest board revision.
v5 of the BHB board has:

* GD25Q64C instead of the GD25Q16C.
* Pin PB10 tied to ground for board revision detection.
2020-12-12 19:16:35 -05:00
BennyE
c5c13620f2 Fix for issue 3663 by returning early if no scan was started before stop is issued 2020-12-12 00:49:53 +01:00
Hosted Weblate
54fcf127c7
Merge branch 'origin/main' into Weblate. 2020-12-11 23:00:50 +01:00
Dan Halbert
eda3392f50
Merge pull request #3818 from dhalbert/apt-update
add apt-get update
2020-12-11 17:00:44 -05:00
BennyE
81c4871fdf Set DEBUG CFLAG if set in make 2020-12-11 22:11:39 +01:00
Dan Halbert
37c9f768b5 add apt-get update 2020-12-11 16:03:28 -05:00
BennyE
2de5eba6d1 add apt-get update 2020-12-11 21:17:07 +01:00
BennyE
e3194ad54e Reserve UART pins only if DEBUG=1 is set to address issue 3811 2020-12-11 20:35:28 +01:00
Hosted Weblate
4becc00a7b
Merge branch 'origin/main' into Weblate. 2020-12-11 20:08:28 +01:00
Wellington Terumi Uemura
8d9d53a07c
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (877 of 877 strings)

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
2020-12-11 20:08:28 +01:00
Scott Shawcroft
d920750756
Merge pull request #3815 from dhalbert/python3-mkenv-mk
Use $(PYTHON3) instead of $(PYTHON) in make actions
2020-12-11 11:08:15 -08:00
Dan Halbert
39124b888b doc fixes 2020-12-11 09:03:45 -05:00
Dan Halbert
1daad63d2b add apt-get update 2020-12-11 08:34:40 -05:00
Dan Halbert
cf938983e9 SleepMemory + set alarm.wake_alarm 2020-12-11 08:10:26 -05:00
Dan Halbert
d83d46a52d Invoke scripts with 2020-12-10 14:28:22 -05:00
Dan Halbert
55f4110983 fix typo 2020-12-10 14:16:25 -05:00
Dan Halbert
5964163649 Initial SleepMemory code 2020-12-10 13:03:40 -05:00
Hosted Weblate
8b98867f07
Merge branch 'origin/main' into Weblate. 2020-12-09 20:37:07 +01:00
Scott Shawcroft
e9fd689d57
Merge pull request #3814 from mcauser2/main
Fix some spelling mistakes
2020-12-09 11:36:59 -08:00
Hosted Weblate
6af532f4f0
Merge branch 'origin/main' into Weblate. 2020-12-09 19:03:40 +01:00
Scott Shawcroft
e14b148e62
Merge pull request #3803 from skieast/fix_i2c_hang_with_wifi
Working, tested with two i2c busses
2020-12-09 10:03:31 -08:00
Mike Causer
eedcc98cc5 Fix some spelling mistakes 2020-12-10 02:52:18 +11:00
Hosted Weblate
cea6c3d8d6
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/main
Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
2020-12-09 01:34:28 +01:00
Hosted Weblate
fea25c1c5e
Merge branch 'origin/main' into Weblate. 2020-12-09 01:34:27 +01:00
Scott Shawcroft
133013083a
Merge pull request #3808 from tannewt/panic_safe_mode
Enter safe mode after panic or brownout
2020-12-08 16:31:22 -08:00