foamyguy
0f478d59fe
remove string import. use minimum sized dirty area
2021-08-21 16:15:59 -05:00
Amit Sides
1b6283a5ae
Adding quick refresh support
2021-08-21 23:51:24 +03:00
foamyguy
aeeba3904b
changed argument names and make replaced_color_value argument optional
2021-08-21 11:08:25 -05:00
James Carr
16a0306e29
Remove the pixel_luma parameter from displayio_colorconverter_compute_tricolor ( Closes #5194 )
...
Not tested, I don't currently have a three colour eInk screen to test with.
2021-08-21 16:32:36 +01:00
microDev
25437dcb33
Merge branch 'main' into atexit
2021-08-20 09:45:54 +05:30
Dan Halbert
5b0009cbc4
Merge pull request #5151 from dhalbert/usb_hid-changes
...
Support multiple reports per device in usb_hid
2021-08-17 17:14:28 -04:00
Dan Halbert
1bcf66ff8d
Check buffer existence in tud callbacks (addresses #5020 )
2021-08-17 15:34:48 -04:00
Jeff Epler
d67acb8a64
MP3Decoder: Fix playback stopping issue
...
Closes : #5164
2021-08-17 10:03:47 -05:00
Dan Halbert
38f42818e9
fix gc; update KEYBOARD report descriptor
...
The default KEYBOARD report descriptor had a signed/unsigned error,
and also could have allowed more keycodes. So I changed it, using the
very vanilla descriptor from a very plain extremely common commercial
keyboard, modifying it only have 5 LED's instead of 3, and added a
report ID.
2021-08-16 18:59:41 -04:00
microDev
bdf8bc58ed
allow exception raise inside atexit callback
2021-08-16 22:35:04 +05:30
microDev
1c4a6c3667
atexit module refinements
...
- add test for atexit module
- add callback to gc collection
- fix callback memory allocation
- execute callback on both code and repl exit
2021-08-16 21:37:32 +05:30
foamyguy
6f783060c2
ignore points outside of bitmap
2021-08-15 19:11:15 -05:00
Dan Halbert
f37e1d7bf5
squeeze a couple of boards
2021-08-14 17:36:05 -04:00
Dan Halbert
3dc2b4c2d3
at least original functionality with new API
2021-08-14 12:36:40 -04:00
Dan Halbert
4f8ff12afa
wip
2021-08-14 12:36:40 -04:00
foamyguy
ec8b31e7b4
code format and translations
2021-08-13 10:13:38 -05:00
foamyguy
c1e164e1ff
rename to boundary_fill and clean up comments
2021-08-13 09:52:51 -05:00
foamyguy
0bbb0f1d06
Merge branch 'adafruit_main' into bitmaptools_paint_fill
2021-08-13 09:49:24 -05:00
Scott Shawcroft
de796e2304
Move OneWire to onewireio
from busio
...
This will allow finer grained inclusion in 8.0.0
Fixes #5135
2021-08-12 10:47:14 -07:00
Scott Shawcroft
ebf0901558
Merge pull request #5079 from dhalbert/debug-audio
...
Fix various RP2040 and SAMD audio issues
2021-08-11 11:19:53 -07:00
Dan Halbert
24e61a7da8
Track more carefully which audio buffers to fill, based on interrupt channels
2021-08-10 22:00:09 -04:00
microDev
93c9d59960
Merge branch 'main' into getpass
2021-08-10 01:00:10 +05:30
microDev
3495cc1ff6
Merge pull request #5110 from jepler/format-exception
...
Implement `traceback.format_exception`
2021-08-10 00:47:18 +05:30
Kattni
c87d90ec4b
Merge pull request #5090 from WarriorOfWire/draw_protocol
...
Draw protocol
2021-08-09 15:04:36 -04:00
foamyguy
fd372cf06c
it works!
2021-08-09 13:15:58 -05:00
Dan Halbert
2451c788f4
valid channels in audio_dma_stop; cleaner supervisor_ticks mgmt in keypad
2021-08-09 09:47:13 -04:00
foamyguy
87358f81b2
trying to check next pixel
2021-08-09 08:30:12 -05:00
Jeff Epler
c1ffab7476
Reduce code duplication in traceback module
2021-08-09 08:27:28 -05:00
Jeff Epler
bfea6947e5
Improve mp_printf with support for compressed strings
...
* The new nonstandard '%S' format takes a pointer to compressed_string_t
and prints it
* The new mp_cprintf and mp_vcprintf take a format string that is a
compressed_string_t
2021-08-09 08:27:28 -05:00
microDev
51f8603783
add getpass module
2021-08-09 17:50:28 +05:30
Kenny
cf2712d23f
transposing and mirroring work
...
* fix absolute_transform dirtying early instead of after the change, missing the draw
* fix transpose and mirror. (0,0) -> location in all vector shapes now in all rotations.
2021-08-08 17:01:36 -07:00
Kenny
7eece7d959
dirty area computed for non-transposed but at least d-1
2021-08-08 15:35:36 -07:00
foamyguy
158048e56b
trying to make lists
2021-08-08 14:33:07 -05:00
foamyguy
6d57f43eb3
try adding print
2021-08-08 09:34:52 -05:00
foamyguy
bcfec10552
starting bitmaptools.paint_fill
2021-08-08 09:31:09 -05:00
Kenny
9897ac6b5c
yet more failures of local pre-commit to find that which github pre-commit does
2021-08-08 00:25:17 -07:00
Kenny
a1fff320fb
add location property to vectorshape and all composed shapes
2021-08-08 00:14:53 -07:00
Kenny
bb25aeee51
fix code formatting that pre-commit --all-files did not locally report
2021-08-07 19:40:07 -07:00
Kenny
051d7a970e
fix rotation and mirroring
...
now works with all vector shapes, even those with internal reference locations
that are negative. All shape locations are anchored to their 0,0 but they can
display pixels from negative coordinates if the shape's location on the screen
would have room for it.
2021-08-07 19:32:02 -07:00
Kenny
b5837b157d
improve transpose and mirror
...
* add heuristic to avoid drawing area unnecessarily
* fix Polygon.points
* fix transpose
* fix mirror x and y
Known broken:
Polygon with negative Y coordinates does not work right.
2021-08-07 19:31:22 -07:00
microDev
063e3946d6
Merge pull request #5094 from jepler/quirc
...
Add qrio: Decode QR codes with quirc lib
2021-08-07 09:30:20 +05:30
Scott Shawcroft
be2342f32f
Merge pull request #5072 from microDev1/traceback
...
Add traceback module
2021-08-06 12:10:17 -07:00
Jeff Epler
67551c1ac0
qrio: Split QRInfo & PixelPolicy to their own .c/.h files
2021-08-06 09:53:17 -05:00
Jeff Epler
2e8eb43dcc
Use new quirc define for small stacks
...
.. and revert stack enlargement of esp32-s2
2021-08-05 12:52:43 -05:00
microDev
870f26bfc4
traceback module refinements
2021-08-05 20:11:15 +05:30
Jeff Epler
bd903f2f03
Add qrio: Decode QR codes with quirc lib
2021-08-04 09:16:00 -05:00
Kenny
8c22993e28
fix linter
2021-08-02 20:38:37 -07:00
Kenny
8607cdd783
vectorio: add draw protocol
...
* Removes VectorShape from user python interactions
* Re-integrates vectorio with displayio behind draw protocol implementations
* Implements draw protocol with VectorShape
* Composes VectorShape behaviors into Rectangle, Circle and Polygon
* Fixes terrible pixel garbage being left behind
* Improves redraw performance (heuristically) by tracking dirty area separately from current area.
Known Issues:
It does not work with transposed views.
2021-08-02 20:19:54 -07:00
Scott Shawcroft
1e225610cc
Add ability to disable BLE workflow
...
Call `supervisor.disable_ble_workflow()` and the BLE workflow will
be disabled until the chip is reset.
This also includes a couple fixes:
1. Terminals can now be deinit by setting the tilegrid to NULL. This
prevents using the tilegrid before display is init.
2. Fix BLE serial send amount when sending more than a single packet.
Fixes #5049
2021-08-02 18:37:19 -07:00
Kenny
1b67b91edd
fix inverted logic
2021-07-31 16:59:44 -07:00
Kenny
0afd863224
vectorio: palettes don't color dirty rectangles
...
This is a breaking change with previous palette semantic with respect to python code that uses vectorio.
Displayio has breaking changes in cpy 7 for Group's removal of max_size parameter so this is as good a
time as any to break everything.
Currently:
To color vectorio shapes correctly you have to pass in a palette with length 2. Palette[0] must be set transparent and palette[1] must be the color you want.
New:
To color vectorio shapes correctly you pass in a palette with length >= 1. Palette[0] will be the color of the shape.
Also improves pixels per second when skipping areas that aren't covered by the shape.
2021-07-31 16:32:01 -07:00
microDev
a3998d0626
add atexit module
2021-07-30 09:32:28 +05:30
microDev
f371c0a609
add traceback module
2021-07-28 18:06:23 +05:30
Dan Halbert
901a6c27c0
remove gamepad; deprecate gamepadshift
2021-07-26 22:15:09 -04:00
Scott Shawcroft
f84cb94819
Remove OSError(0) and old network modules
...
The newer modules are `socketpool` and `ssl`.
Fixes #3924 , related to #2021 , closes #1880 , closes #2273 , closes #2274
2021-07-21 17:33:40 -07:00
Dan Halbert
f1d2eee58f
Make KeyMatrix row output switch faster
2021-07-21 09:08:32 -04:00
Jeff Epler
2556fce862
OnDiskBitmap: Fix memory corruption when using palette image
...
The number of palette entries set was accidentally 4x too much,
because the wrong looping variable was used.
2021-07-19 09:25:26 -05:00
microDev
40b085746a
Merge pull request #5006 from tannewt/scanentry_match_all
...
ScanEntry.matches() kwarg all -> match_all
2021-07-18 09:45:58 +05:30
Kattni Rembor
c21e16162c
Remove _ from common_hal__adafruit_pixelbuf.
2021-07-16 14:08:39 -04:00
Kattni Rembor
dc2907ac1b
Rename _pixelbuf to adafruit_pixelbuf, alias.
2021-07-16 13:31:40 -04:00
Scott Shawcroft
448597b4a0
ScanEntry.matches() kwarg all -> match_all
...
Related to #3007
2021-07-15 14:36:57 -07:00
Scott Shawcroft
0fadf028ef
Create first BLE-only board, Micro:Bit v2
...
This fixes build issues with USB off, tweaks the README to allow
for BLE-only boards and adds the Micro:Bit v2 definition.
Fixes #4546
2021-07-14 09:55:51 -07:00
Kattni Rembor
4579bf9b12
Rename rainbow to rainbowio
2021-07-12 14:40:01 -04:00
Kattni Rembor
825a706135
Turn off MIDI on one build, fix name.
2021-07-08 17:31:10 -04:00
Kattni Rembor
289575a811
Adding rainbow module.
2021-07-08 15:55:13 -04:00
Dan Halbert
c37f354d2d
Merge pull request #4958 from dhalbert/rp2040-audio-fixes
...
RP2040 PWMAudioOut: Release DMA channels after play has finished
2021-07-02 10:03:54 -04:00
Dan Halbert
33bbb8b1f4
RP2040 PWMAudioOut: Release DMA channels after play has finished.
2021-07-01 17:36:29 -04:00
Jeff Epler
d83a21b984
ColorConverter: Add "BGR" color modes.
...
The BGR565_SWAPPED mode is needed for OV2640 cameras.
2021-06-30 10:29:31 -05:00
Dan Halbert
62aca944f4
Failed to advance buffer ptrs in usb_cdc.Serial properly
2021-06-25 09:50:31 -04:00
Scott Shawcroft
57f898b774
Merge pull request #4915 from Neradoc/fix-4193
...
Fix 4193 - set hidden_by_parent when adding to displayio group
2021-06-24 15:23:33 -07:00
Scott Shawcroft
b81573d439
Merge pull request #4891 from dhalbert/keypad-scanning-events
...
keypad: support for vector and matrix key scanning
2021-06-24 10:25:21 -07:00
Neradoc
63bcee0a2c
set hidden_by_parent when adding to displayio group
2021-06-24 17:19:06 +02:00
Dan Halbert
4f538b6c09
remove pressed() and get_states_into()
2021-06-23 15:10:38 -04:00
Dan Halbert
7774b18895
Add reset() to scanners. Clear .overflow on EventQueue.clear().
2021-06-23 15:04:09 -04:00
Dan Halbert
acf90fbb43
many renamings; add overflowed flag to EventQuque
2021-06-23 09:57:15 -04:00
Dan Halbert
f052dc4d8b
ShiftRegisterKeys: allow specifying sense of latch
2021-06-21 19:50:05 -04:00
Dan Halbert
51c547a5b9
add generic arg validation routines; add interval args to keypad
2021-06-21 12:13:39 -04:00
Dan Halbert
154e91ab85
add EventQueue.store_next() to allow reusing event objects
2021-06-21 08:18:06 -04:00
Dan Halbert
8cd7e774e7
add KeyMatrix columns_to_anodes arg
2021-06-18 12:03:47 -04:00
Dan Halbert
af66931f71
Added keypad.ShiftRegisterKeys
2021-06-17 20:51:45 -04:00
Dan Halbert
a152bd3b72
add .num_keys and .store_states() to Keys and KeyMatrix
2021-06-17 12:02:54 -04:00
Dan Halbert
cd31136c30
factor out keypad.EventQueue
2021-06-16 15:55:54 -04:00
Dan Halbert
3d18c5c327
Use a single list of keypad scanners
2021-06-16 13:29:38 -04:00
Dan Halbert
1803a6a71d
both Keys and KeyMatrix work
2021-06-15 11:15:09 -04:00
Dan Halbert
350652ee21
Keys works; more testing to do
2021-06-14 22:59:17 -04:00
Dan Halbert
32eec85230
compiles
2021-06-14 20:54:43 -04:00
Dan Halbert
627c426259
wip
2021-06-14 16:00:15 -04:00
Dan Halbert
01a8a95b2c
fix signed/unsigned compilation problem
2021-06-10 01:14:16 -04:00
Dan Halbert
d3d9e0a487
add debouncing
2021-06-10 00:07:23 -04:00
Tsutomu IKEGAMI
0a7c839c13
Fix format (expand tab)
2021-06-10 12:11:12 +09:00
Tsutomu IKEGAMI
72c4a5a523
Fix coordinate conversion algorithm of partial refresh area in displayio.TileGrid
2021-06-10 11:47:51 +09:00
Dan Halbert
7d23206018
Inital keypad work: Keys working: one pin per key
...
keypad.Buttons and keypad.State
Buttons -> Keys; further work
wip
wip
wip: compiles
about to try
keypad.Keys working
2021-06-08 20:27:31 -04:00
lady ada
467a4e7664
fix comment
2021-06-07 19:51:57 -04:00
lady ada
b39dd84560
move the col/row offsets to the top so oleds can take advantage of em
2021-06-07 19:43:49 -04:00
lady ada
2ff9e9766f
handclang
2021-06-07 12:39:59 -04:00
lady ada
8f1c25c8ae
fix SH110x mode, the SH1107 is actually column not row mode BUT the SD1107 module we use is vertical orientation (confusing!) so row/col are NOT swapped. we will have to fix the SH1107 driver to match. this fix required for SH1106 (which uses the same page mode commands but ISNT rotated)
2021-06-06 18:25:40 -04:00
Tsutomu IKEGAMI
a4be61912c
Fix move cursor esc sequence of terminalio to meet ANSI standard
2021-06-03 20:40:37 +09:00
Dan Halbert
3930440bc5
Fix usb_cdc.enable(console=False, data=True)
2021-06-02 11:29:56 -04:00
Scott Shawcroft
6ee9acc900
Merge pull request #4755 from jepler/esp32s2-protomatter
...
Esp32s2 protomatter
2021-06-01 13:32:34 -07:00
Jeff Epler
9df8f235b1
OnDiskBitmap: INCOMPATIBLE CHANGE: Allow them to use palettes
...
Before, when an OnDiskBitmap was a paletted bitmap type, the palette
was internal to the OnDiskBitmap, and it internally performed the palette
conversion itself. When using with a tilegrid, a ColorConverter() object
always had to be passed.
Now, an OnDiskBitmap has a "pixel_shader" property. If the bitmap is
a paletted bitmap type, it is a (modifiable) Palette object. Otherwise,
it is a ColorConverter() object as before. This allows palette effects
to be applied to paletted OnDiskBitmaps.
Code that used to say:
```python
face = displayio.TileGrid(odb, pixel_shader=displayio.ColorConverter())
```
must be updated to say:
```python
face = displayio.TileGrid(odb, pixel_shader=odb.pixel_shader)
```
Compatible code for 6.x and 7.x can say
```python
face = displayio.TileGrid(odb, pixel_shader=getattr(odb, 'pixel_shader', ColorConverter())
```
2021-05-28 10:53:21 -05:00