Dan Halbert
3f66a0be83
Merge pull request #7611 from gamblor21/colorconverter-mem-fix
...
ColorConverter output colorspace non-initialization fix
2023-02-19 20:34:30 -05:00
gamblor21
e78875a93b
ColorConverter output colorspace fix
2023-02-18 15:35:56 -06:00
Neradoc
3c93594563
Deinit the reset pin when displayio.I2CDisplay raises an exception
2023-02-10 19:54:10 +01:00
foamyguy
fab1bb5f21
fix for native is31fl3741
2023-02-03 17:43:12 -06:00
Maciej Sokołowski
2276254f6c
Fix compilation
2023-01-19 21:50:59 +01:00
Maciej Sokołowski
483f14b73f
Allow lines with ends out of bitmap in bitmaptools_obj_draw_line
2023-01-19 21:37:25 +01:00
Dan Halbert
a3adcf0e1a
clarify read-only mac address; reuse translate msgs
2023-01-02 10:13:20 -05:00
Jeff Epler
34043c2d38
Only store up to 'width' pixels, not 'stride'
...
error detected by clang scan-build static analysis
2023-01-01 16:45:40 -06:00
Jeff Epler
d808185744
Emphasize that ALIGN_BITS is a constant
2023-01-01 16:45:40 -06:00
Jeff Epler
d2361ae4f9
Avoid an undefined shift
...
(1 << 32), an operation on a signed 32-bit int, is undefined in C. The
operation on the unsigned int (1u<<32) is defined as zero, which is
the desired outcome (subtracting 1 yields the value with all bits set)
This problem was detected by clang scan-build static analysis
2023-01-01 16:45:35 -06:00
Jeff Epler
7a005aa96b
break out after reading the value
...
This is a small optimization, it avoids reading the full file when an
early key is requested.
In the case of an *invalid* TOML file such as
```
K=80
K=81
```
this stops the value of K actually returned being 8081 and makes it 80
instead; but as it's a malformed file it doesn't really matter much.
2022-12-28 13:24:38 -06:00
Jeff Epler
15a24b400d
Permit trailing whitespace in getenv_int
2022-12-28 12:37:27 -06:00
Jeff Epler
f6b69cf5e3
Allow settings.toml to end without a newline
2022-12-26 10:53:58 -06:00
Jeff Epler
4dbbfa0931
Print errors to repl about getenv
2022-12-26 10:53:58 -06:00
Dan Halbert
398b7c26ca
Merge pull request #7321 from jepler/dotenv-becomes-toml
...
Dotenv becomes toml
2022-12-13 19:56:36 -05:00
Jeff Epler
d40ba94449
explain why this is its own file
2022-12-13 13:19:10 -06:00
Jeff Epler
35f2046ab2
Fix returning GETENV_ERR_LENGTH for over-long strings
2022-12-13 12:02:07 -06:00
Radomir Dopieralski
6412d971fa
displayio: Set in_group to false when removing a layer from a group
...
Otherwise the removed layer cannot be re-added.
2022-12-11 02:59:56 +01:00
Jeff Epler
dd6dd5df21
rework the getenv test again
...
* use a virtual fat filesystem during the test
* this makes the file I/O part more closely patch runtime which is nice
* side-steps the need to add a special function for testing
* but test still can't be run on a device, because the vfs calls
are incompatible, and you intentionally can't remount "/" anyway
* and side-steps problems with storing 'bad' toml files
2022-12-10 12:58:08 -06:00
Jeff Epler
040fac0724
No need to track excess length
...
.. this is a relic from when the actual required length was given
back to the caller
2022-12-09 14:29:14 -06:00
Jeff Epler
cc7d550407
Really finish renaming to getenv
2022-12-09 14:28:46 -06:00
Jeff Epler
44f15d563d
Rename "environ" errors to "getenv" errors
2022-12-09 14:14:53 -06:00
Jeff Epler
3a92c079fc
Finish renaming os_environ_get_key to os_getenv
...
.. for consistency.
2022-12-09 14:07:23 -06:00
Jeff Epler
3459fe322b
Withdraw the _environ module
...
This existed solely for testing, so expose it a different way during
the unix coverage build
Also turn off os.getenv support on samd21.
2022-12-08 15:33:10 -06:00
Jeff Epler
ef2bfdb5db
dotenv becomes settings.toml
2022-12-08 12:44:20 -06:00
Scott Shawcroft
9e104c04ae
Merge pull request #7215 from FoamyGuy/set_root_group
...
displayio.show() API change
2022-12-02 08:45:20 -08:00
foamyguy
57462092b5
return None instead of NULL for framebuffer and epaper
2022-12-01 17:34:43 -06:00
foamyguy
42f1d50acc
remove extra function call. handle show(None) for framebuffer and epaper
2022-12-01 17:25:36 -06:00
Dan Halbert
082b0d1aed
Merge pull request #7191 from jepler/fastpixelmap
...
Add a fast PixelMap-like class
2022-12-01 11:43:00 -05:00
foamyguy
0563487433
get slicing
2022-11-30 19:16:20 -06:00
Jeff Epler
db01dfea20
use a standard length validator
2022-11-30 12:06:19 -06:00
foamyguy
1bbdc820c0
make show(None) show the terminal
2022-11-28 17:02:46 -06:00
foamyguy
553d48f887
return None for NULL
2022-11-28 09:03:03 -06:00
foamyguy
b8d6605cff
code format, extra space
2022-11-27 17:26:46 -06:00
foamyguy
6844dc0cb7
code format, extra space
2022-11-27 14:20:15 -06:00
foamyguy
15a9e63fda
remove is_null troubleshooting function. remove empty line
2022-11-27 14:08:38 -06:00
foamyguy
738b73d4b4
check for NULL in fill_area. moved start_terminal to reset_display.
2022-11-27 13:54:53 -06:00
foamyguy
2c479f4fce
working on None behavior
2022-11-26 11:00:09 -06:00
foamyguy
57d7f7f2ad
move to _pixelmap
2022-11-24 09:07:08 -06:00
foamyguy
e5ea1d2247
try to revert pixelbuf merge brokenness. remove second color_u def.
2022-11-22 18:47:25 -06:00
foamyguy
19f1119994
Merge branch 'main' into fastpixelmap
...
# Conflicts:
# shared-module/adafruit_pixelbuf/PixelBuf.c
2022-11-21 20:25:58 -06:00
foamyguy
fa4b480439
looking into how null show works
2022-11-21 20:21:39 -06:00
foamyguy
ef3398422a
allow set_root_group for FrameBufferDisplay instead of show()
2022-11-19 11:41:48 -06:00
foamyguy
e3cae22297
allow set_root_group for EPaperDisplay instead of show()
2022-11-18 17:34:03 -06:00
foamyguy
403e3ef430
change to CIRCUITPYTHON_TERMINAL. change internal API to use set_root_group
2022-11-18 16:53:18 -06:00
MicroDev
f637332de6
Merge pull request #7209 from jepler/code-optimize-pixelbuf
...
Save code space by packing rgbw values into C union
2022-11-18 14:46:55 +05:30
foamyguy
5b64a62c16
move hidden declare inside struct
2022-11-15 18:37:23 -06:00
Jeff Epler
14ba5a75a3
skip converting from long int if long ints aren't enabled
...
.. saves 20 bytes on proxlight trinkey
2022-11-14 21:26:58 -06:00
Jeff Epler
2d08473ee0
this version actually saves more code space on cortex-m0 with -Os (samd21s)
2022-11-14 21:18:40 -06:00
Jeff Epler
adca341d3b
Save code space by packing rgbw values into C union
...
It's more efficient passing one register-sized structure than 4
arguments or 4 pointers; working on intermediate values of 'int' size
is also more efficient in code size!
On raspberry pi pico w, this increased free flash space by +104 bytes.
It also increased the speed of my testing animation very slightly, from
187fps to 189fps when run 'unthrottled'
2022-11-14 09:29:45 -06:00