Commit Graph

396 Commits

Author SHA1 Message Date
Jeff Epler 52540a9830 Rename EXTENDED_FIELDS -> MP_TYPE_EXTENDED_FIELDS 2021-07-12 06:57:59 -05:00
Jeff Epler 7302bc09a7 rename the type flag to EXTENDED for consistency 2021-07-09 14:59:37 -05:00
James Carr 2e068d0384
Minor docs fix in TileGrid.c 2021-07-07 22:30:30 +01:00
Jeff Epler d37f8a1a5a milestone: a selection of builds succeed 2021-07-06 10:57:44 -05: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 259d5b9e7d Fix displayio.Display __init__() signature documentation 2021-06-28 09:32:50 -04:00
Jeff Epler 193f8b7264 Fixes needed after micropython merges
.. this branch was old and stale, it turns out
2021-05-28 11:13:55 -05: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
Scott Shawcroft 3fda0c0a1b
Fix board builds and use MP_ERROR_TEXT in py and extmod 2021-05-05 17:51:52 -07:00
Jeff Epler 52589691b8
Merge pull request #4651 from lesamouraipourpre/minor-docs-fixes
Minor docs fixes in displayio.Bitmap
2021-04-29 08:12:47 -05:00
Scott Shawcroft 17fcd499b2
Merge pull request #4649 from tannewt/merge_1.11_2
Merge MicroPython v1.11 into CircuitPython
2021-04-27 11:02:02 -07:00
Scott Shawcroft 76033d5115
Merge MicroPython v1.11 into CircuitPython 2021-04-26 15:47:41 -07:00
Jeff Epler 8565a9ab90 shared-bindings: Fix type of Colorspace values in docs 2021-04-23 12:39:37 -05:00
Jeff Epler 05a81a066e displayio: Improve docs about Colorspaces 2021-04-23 09:57:24 -05:00
James Carr 0be610fd2b
Changes as requested for Bitmap docs. 2021-04-23 14:41:47 +01:00
James Carr 07059dd373
Minor docs fixes in displayio.Bitmap 2021-04-23 12:56:44 +01:00
Jeff Epler 76d68f21ac displayio: Add RGB555/565/_SWAPPED format support
This is helpful when displaying frames from an OV7670 camera, which
uses the RGB565_SWAPPED format internally.
2021-04-19 10:23:47 -05:00
James Carr 8958c1e227 Minor documentation fixes in displayio 2021-04-06 10:47:46 +01:00
Jeff Epler 78089107bc displayio.Bitmap: Allow modification though the buffer protocol
It is required to call .dirty() with appropriate arguments after modifications through the buffer protocol, or the display might not be updated correctly.
2021-04-03 10:41:20 -05:00
Jeff Epler 3f158450f9 can't xref this right now 2021-04-02 13:09:23 -05:00
Jeff Epler 758dc81fcb displayio: ulab.frombuffer -> ulab.numpy.frombuffer 2021-04-02 13:09:23 -05:00
Jeff Epler 623ece2c73
Merge pull request #4429 from jepler/displayio-bitmap-memoryview
displayio.Bitmap: Make memoryview()able
2021-03-18 18:38:25 -05:00
Jeff Epler 720d242b4f doc fix 2021-03-17 16:38:10 -05:00
Jeff Epler c157ada90c displayio.Bitmap: Make memoryview()able 2021-03-17 16:26:45 -05:00
Kevin Matocha 592f89f6ae add back peculiar r to docstring 2021-03-16 20:45:55 -05:00
Kevin Matocha 5c3cce6f5d add is_transparent getter to displayio.Palette 2021-03-16 20:43:23 -05:00
gamblor21 bdc368895f Formatting 2021-03-16 08:39:44 -05:00
Mark e326d7ca80
Merge branch 'main' into rp_dp_parallel 2021-03-15 20:00:13 -05:00
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
gamblor21 5689307798 Changed frequency to match PIO having 2 instructions 2021-03-11 19:32:44 -06:00
gamblor21 b02b1e9979 Set frequency default 60Mhz 2021-03-11 19:32:44 -06:00
gamblor21 56a219911f Add frequency support to parallel bus 2021-03-11 19:32:43 -06:00
Radomir Dopieralski 24473b7983 Separate out mp_obj_list_insert for use in display.Group
Note that for some reason this makes the binary 500 bytes larger!
2021-02-27 21:13:55 +01:00
Radomir Dopieralski 38fb7b511b Remove max_size from displayio.Group
Still accept it as an argument. Add deprecation note.
2021-02-27 20:52:38 +01:00
Radomir Dopieralski e9953754ea Add displayio.Group.sort() method 2021-02-27 20:52:38 +01:00
arturo182 ca1a85c47f displayio: Fix ColorConverter make_* methods 2020-11-25 03:39:14 +01:00
Jeff Epler f61f8f999b EPaperDisplay: add rotation property
untested, because I don't want to mess my magtag demo up :) but it builds
2020-11-18 18:06:31 -06:00
Scott Shawcroft 78ccac930f
Add .busy property to EPaperDisplay 2020-11-13 18:57:52 -08:00
Scott Shawcroft 8d4296f964
Add board.DISPLAY to MagTag. Fix luma computation
* Initialize the EPaper display on the MagTag at start.
* Tweak the display send to take a const buffer.
* Correct Luma math
  * Multiply the blue component, not add.
  * Add all of the components together before dividing. This
    reduces the impact of truncated division.
2020-11-13 18:57:52 -08:00
Scott Shawcroft 9da99675b1
Correct display sequence format docs 2020-11-10 16:44:09 -08:00
sw23 ad166ca479 Fixing make stub warnings and mypy issuesmak 2020-10-29 20:15:34 -04:00
Scott Shawcroft 0d1649880f
Add grayscale EInk support 2020-10-26 16:59:59 -07:00
Jensen Kuras d2dada869c
displayio: Update docs for ColorConverter's make_opaque
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2020-10-19 17:27:01 -05:00
Jensen 74c07a4bdc displayio: Add in opaque pixel option for future 2020-10-16 19:50:41 -05:00
Jensen b02a5bcbd5 displayio: Remove verbose error 2020-10-14 23:05:19 -05:00
Jensen 2517e4b486 displayio: ColorConverter handle if opaque color is black 2020-10-14 21:51:40 -05:00
Jensen 337019626a displayio: Add make_transparent to ColorConverter 2020-10-12 20:48:04 -05:00
Jensen b359e2945a displayio: Add make_transparent and make_opaque to ColorConvertor 2020-10-12 20:48:04 -05:00
Jensen 57b44928a3 displayio: Pass transparent_color to ColorConverter
Signed-off-by: Jensen <jensechu@gmail.com>
2020-10-12 20:48:04 -05:00
Mark Roberts 9f19a8a760
Ran pre-commit locally 2020-09-30 11:06:13 -07:00
Mark Roberts 06a3d15266 Mostly-working-version with comments 2020-09-24 22:07:33 -04:00
Mark Roberts 5536e574db Changes to compile cleanly 2020-09-21 22:08:16 -04:00
Mark Roberts f21dc253e0 Initial commit bool column_and_page_addressing 2020-09-21 18:42:16 -04:00
Kevin Matocha d224183a7e Delete trailing whitespace 2020-09-02 11:26:37 -05:00
Kevin Matocha 8256bf7ea6 Add backticks to function references in docs 2020-09-02 11:20:30 -05:00
Kevin Matocha 4b9306aa7c Cleanup for sphinx 2020-09-01 18:10:40 -05:00
Kevin Matocha 554cc356db Delete trailing whitespace 2020-09-01 15:43:18 -05:00
Kevin Matocha 7b6d805580 Add Optional[int] to docs string 2020-09-01 15:40:55 -05:00
Kevin Matocha 649a955a74 Modified docs to try to pass sphinx build 2020-09-01 15:02:37 -05:00
Kevin Matocha c6529daac5 Added some backticks to clarify the docs 2020-09-01 14:44:32 -05:00
Kevin Matocha f5015e4485 Add hanging tab to doc 2020-09-01 14:36:43 -05:00
Kevin Matocha e14de38528 Revise .refresh input default value for target_frames_per_second to None 2020-09-01 13:57:19 -05:00
Kevin Matocha 8be862e644 Remove trailing whitespace 2020-09-01 10:26:48 -05:00
Kevin Matocha c4b1db006f delete unnecessary comment 2020-09-01 09:38:57 -05:00
Kevin Matocha fc513956be Update refresh to force immediate redraw with display.refresh() or display.refresh(target_frames_per_second=None), even with auto_refresh=False 2020-09-01 09:36:29 -05:00
Kevin Matocha f55f2bfee1 shorten error strings 2020-08-21 21:40:46 -05:00
Kevin Matocha 7f629624db Added hanging indents to docs per @sommersoft's suggestion 2020-08-21 20:50:15 -05:00
Kevin Matocha 5b6313e642 More tweaks to try to fix documentation failing 2020-08-21 16:13:18 -05:00
Kevin Matocha f1fb2cde17 Minor tweaks to try to fix documentation failing 2020-08-21 16:12:40 -05:00
Kevin Matocha 9a6a156512 Update documentation string with blank line 2020-08-21 15:26:50 -05:00
Kevin Matocha a9f6d147c4 Merge adafruit/main latest 2020-08-21 14:37:32 -05:00
Kevin Matocha 7e529ed4c5 Merge with latest adafruit/main 2020-08-21 14:28:24 -05:00
Kevin Matocha 24ca133396 Updating main to adafruit/main 2020-08-21 14:19:28 -05:00
Kevin Matocha 6c199c5d69 Update documentation to remove whitespaces 2020-08-15 15:58:04 -05:00
Kevin Matocha bfa9904f3e Corrected erroneous edit to fill description to -> None 2020-08-14 14:28:06 -05:00
Kevin Matocha e84723abba Bug fixes related to input parameter handling x1,y1. Update comments 2020-08-14 14:22:34 -05:00
Kevin Matocha b1fce9e933 Deleted trailing whitespace 2020-08-14 13:36:59 -05:00
Kevin Matocha a66ef32da2 Added inclusive indexing for x2,y2, fixed default value handling for x1,y1, added bitmap palette comparison 2020-08-14 13:15:01 -05:00
Margaret Matocha 824f47d6e9 Added bitmap.blit function for bitmap slice copy 2020-08-14 12:59:57 -05:00
Margaret Matocha 4ba9ff892c Added bitmap.blit function for copying slices of bitmaps 2020-08-14 12:59:48 -05:00
Margaret Matocha 64c9baa6aa Added bitmap.insert function for slice copy into a bitmap from another bitmap 2020-08-07 15:46:00 -05:00
Taku Fukada 56c898da80 Modify some Python stubs 2020-08-07 01:01:28 +09:00
Christian Walther 8498e7f2cd Fix inability to set values in 32-bit Bitmap. 2020-07-30 00:35:25 +02:00
Scott Shawcroft 05a1519e5d
Merge pull request #3214 from kmatch98/bitmap_write
Updated Group.c to correct bug with insert into displayio.Group
2020-07-29 10:46:33 -07:00
Margaret Matocha 0887bc2112 Updated to remove else statment, attempt to remove excess mpy-cross... file 2020-07-28 15:03:51 -05:00
Margaret Matocha 076c5f946f Updated to remove unnecessary else statement 2020-07-28 14:53:50 -05:00
Margaret Matocha fd7801415a Deleted mpy-cross file 2020-07-28 14:53:09 -05:00
Margaret Matocha db26e894fb Updated Group.c to correct bug with insert into groups 2020-07-27 22:25:21 -05:00
Taku Fukada d356581651 Fix several type hints 2020-07-27 18:05:13 +09:00
Taku Fukada 54a342a7f5 Add and correct some type hints 2020-07-24 18:20:03 +09:00
dherrada bfcaa4b2b4 Made requested changes in displayio 2020-07-16 16:11:22 -04:00
dherrada bce77adecd Added type hints previously missed 2020-07-03 16:03:19 -04:00
dherrada d0d949cd24 Made every init return None 2020-07-03 14:23:34 -04:00
dherrada 3df03a5650 Made most of the requested changes 2020-07-03 13:49:00 -04:00
dherrada 783cc4de39 Added type hints to displayio 2020-07-03 10:05:14 -04:00
dherrada 54cb1feea0 Removed all 'self, )' 2020-07-02 13:28:36 -04:00
Jeff Epler 32a29ffdff shared-bindings: Change docstrings with '\x...' chars to raw strings
Closes: #3032
2020-06-14 13:05:08 -05:00
Diego Elio Pettenò dd5d7c86d2 Fix up end of file and trailing whitespace.
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-03 10:56:35 +01:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
dherrada 2ebe3035df
Did board, digitalio, displayio 2020-05-07 10:54:09 -04:00
Jeff Epler 507e17fbf1 displayio: Fix "bus type" problem introduced at 8cba145c90
When allocate_display_bus_or_raise was factored out, the assignment
of the bus's Python type was lost.  Restore it.

This would have affected displays of any type other than RGBMatrix, when
they were created dynamically.  Boards with displays configured in flash
were unaffected.

Closes: #2792
2020-04-21 13:48:34 -05:00
Jeff Epler 09dc46a984 Add Protomatter and FramebufferDisplay 2020-04-14 18:24:54 -05:00
Jeff Epler 8cba145c90 displayio: implement, use allocate_new_display_bus_or_raise 2020-04-14 18:24:54 -05:00
Jeff Epler 6378d600c4 displayio: implement, use allocate_display_or_raise 2020-04-14 18:24:54 -05:00
caternuson dc75746842 add docstring, clean up 2020-04-09 08:59:26 -07:00
caternuson 49fff2d9b4 initial working fill 2020-04-09 08:43:50 -07:00
Jeff Epler 54e8c63b4f
Merge pull request #2730 from tannewt/fix_fourwire_phase_polarity
Add polarity and phase to FourWire.
2020-03-28 07:28:37 -05:00
Scott Shawcroft a870908718
Don't break the function signature 2020-03-26 14:11:20 -07:00
siddacious 9e0c00dfd4 adding a backlight polarity flag to Display 2020-03-25 22:51:20 -07:00
Scott Shawcroft 6b7acc65b6
Add polarity and phase to FourWire.
It was fixed as 0/0 even though it used to get it from the current
SPI state. This makes it more explicit with kwargs.

Thanks to magpie_lark and kmatocha on the Adafruit Support forum
for finding the issue: https://forums.adafruit.com/viewtopic.php?f=60&t=162515
2020-03-25 11:22:46 -07:00
Dan Halbert fdcdc1320b Make ParallelBus reset ping arg required 2020-03-06 14:30:30 -05:00
Dan Halbert 817b5be320 rename routines to be clearer; fix wiznet arg types 2020-03-05 16:35:31 -05:00
Dan Halbert 8435935429 update uses of assert_pin_free; remove redundant checks 2020-02-29 15:37:32 -05:00
Dan Halbert b6206406de new pin validation routines; don't use mp_const_none if NULL will do 2020-02-28 23:43:04 -05:00
Melissa LeBlanc-Williams 33774e790c Updated OnDiskBitmap RTD example for 5.x 2020-02-14 10:23:23 -08:00
Dan Halbert a4ebd2f7c1 allow tuple or list for Palette color 2020-02-03 22:09:53 -05:00
Scott Shawcroft 5d24ade5c9
Tweak error messages to reduce code size. 2020-01-29 17:32:07 -08:00
David Glaude 01d49eb0a7
Update Shape.c
Make no sense to say this is experimental and will change in 4.0.0 when we are already above 4.0.0.
This should be removed, or updated to say it will not be in x.0.0
2019-12-30 16:54:16 +01:00
Jeff Epler a63da7a6c0 displayio: make 'rotation' property settable 2019-12-16 15:23:41 -06:00
Scott Shawcroft 17c8356b8c
Add connection interval and debugging
This also sets TinyUSB to master and to not include its submodules.

It also fixes an old displayio example comment and retries gattc
reads.
2019-12-04 14:39:02 -08:00
Scott Shawcroft 6ad860a963
Merge pull request #2101 from matthewnewberg/display_io_dither
Add random dithering to ColorConverter
2019-09-09 10:11:07 -07:00
Scott Shawcroft d9e0641606
Set dither default to False and document it 2019-09-08 21:30:52 -07:00
Matthew Newberg 8e55232492 Use kwargs for dither in ColorConverter constructor 2019-09-06 16:23:24 -04:00
Matthew Newberg b2fb5ac1c1 Fix comment on color converter 2019-09-06 16:11:15 -04:00
Matthew Newberg 4604a69498 Move dither parameter to ColorConverter constructor and parameter 2019-09-05 21:55:45 -04:00
Scott Shawcroft 949f8761b8
Add .hidden to TileGrid and Group
This allows for one to preserve ordering within a Group while
hiding something temporarily.

Fixes #1688
2019-09-03 16:15:27 -07:00
Matthew Newberg d87bfaf480 Add random dithering to ColorConverter 2019-08-31 22:07:09 -04:00
Scott Shawcroft bea77c651a
Minor renames 2019-08-26 16:37:59 -07:00
Scott Shawcroft 7324b70a7c
Rework based on Dan's review 2019-08-23 15:27:21 -07:00
Scott Shawcroft 72e7ffa324
More cleanup 2019-08-22 16:16:09 -07:00
Scott Shawcroft f2a1972ba8
Add refresh_time to use if busy_pin is not given 2019-08-22 14:23:33 -07:00
Scott Shawcroft 3a98de1236
Add reset() to display busses to detect whether it works 2019-08-22 14:23:33 -07:00
Scott Shawcroft 24b30965c4
Refresh ePaper displays once code.py is done running 2019-08-22 14:23:32 -07:00
Scott Shawcroft 36a23e0fe3
Rework refresh API and factor common display stuff out
NOT TESTED! Just compiles

Fixes #1691
2019-08-22 14:23:27 -07:00
Scott Shawcroft c247e7df9c
Begin refresh rework. 2019-08-22 14:08:33 -07:00
Scott Shawcroft 70680d5b22
EPaper displays work mostly. 2019-08-22 14:08:33 -07:00
Scott Shawcroft 8fa8737465
Initial ePaper work 2019-08-22 14:08:32 -07:00
Dave Astels 99a3da3b60 Get rid of the last bits of array dependancy 2019-08-21 15:24:39 -04:00
Dave Astels d547d59cba Merge remote-tracking branch 'adafruit/master' into displayio_fill_area 2019-08-21 15:02:51 -04:00
Dave Astels 8bbab01316 Remove unneeded lines 2019-08-21 13:57:52 -04:00
Dave Astels 56aad056da getting the buffer info should happen first (due to its check) 2019-08-20 17:00:24 -04:00
Dave Astels eb0a8cc0bf Move the get_buffer call earlier 2019-08-20 13:48:12 -04:00
Dave Astels 0fd886fa7f Remove array cast 2019-08-20 13:45:58 -04:00
Dave Astels f3d476aad8 Remove temporarily comments code 2019-08-20 12:25:56 -04:00
Dave Astels 53bb95a023 Rework to simplify 2019-08-20 10:05:41 -04:00
Dave Astels 10bc0d29d1 Switch to positional parameters 2019-08-20 10:05:09 -04:00
Dave Astels 2b7897cded Fix typo 2019-08-20 10:03:36 -04:00
Dave Astels 7a235f3746 Simplify to only extracting one line
Since this was the usecase, doing so simplifies the function significantly.
2019-08-16 21:10:09 -04:00
Jeff Epler 32a6d36405 shared-bindings: Use RUN_BACKGROUND_TASKS 2019-08-11 08:53:02 -05:00
Dave Astels 239ad19765 Pass in preallocated result buffer 2019-08-07 15:27:43 -04:00
Dave Astels 263f6f439b Remove obsolete experimental property 2019-08-07 15:27:04 -04:00
Scott Shawcroft 26f64dd8ec
Merge remote-tracking branch 'adafruit/4.1.x' into merge_in_410 2019-08-05 17:53:08 -07:00
Dave Astels cd092df9d8 Merge remote-tracking branch 'adafruit/master' into displayio_fill_area 2019-07-31 18:46:41 -04:00
Dave Astels 1f9cb44fa3 Expose rotation with a property 2019-07-31 15:00:21 -04:00
Dave Astels 741cd9c40a Get fill_area working 2019-07-31 12:47:32 -04:00
Scott Shawcroft af8cfbedfb
Add knobs for SSD1322 and two fixes.
* Fix terminal clear after first successful code.py run.
* Fix transmitting too many bytes for column constraint with single
  byte bounds.
2019-07-25 15:41:12 -07:00
Dave Astels b6178c9d85 WIP on exposing fill_area 2019-07-25 15:05:30 -04:00
Scott Shawcroft 1d1b8703b6
Review feedback including NO_BRIGHTNESS_COMMAND macro 2019-07-19 16:11:13 -07:00
Scott Shawcroft 6797ec6ed3
Add support for grayscale displays that are < 8 bit depth.
This also improves Palette so it stores the original RGB888 colors.

Lastly, it adds I2CDisplay as a display bus to talk over I2C. Particularly
useful for the SSD1306.

Fixes #1828. Fixes #1956
2019-07-19 16:06:11 -07:00
Scott Shawcroft 4a6bdb6fe4
Track a dirty area for in-memory bitmaps
This fixes the bug that bitmap changes do not cause screen updates
and optimizes the refresh when the bitmap is simply shown on the
screen. If the bitmap is used in tiles, then changing it will
cause all TileGrids using it to do a full refresh.

Fixes #1981
2019-07-18 16:47:28 -07:00
Scott Shawcroft 745ff8f8c1
Fix Group subscr to detect delete correctly
Fixes #1957
2019-07-02 18:15:23 -07:00
Craig Forbes db74b92e77 Fix displayio.Display docstring type for display_bus.
Add docs for group parameter for Display.show.
2019-06-18 16:59:05 -05:00
Scott Shawcroft 4013bcde9e
Add baudrate to FourWire and shorten delay. 2019-06-17 17:48:05 -07:00
Scott Shawcroft 6f6dcafd90
Minor tweaks based on Dan's feedback 2019-06-13 00:34:19 -07:00
Scott Shawcroft eb21fc3e31
Add partial display update support.
Different operations to the display tree have different costs. Be
aware of these costs when optimizing your code.
* Changing tiles indices in a TileGrid will update an area
covering them all.
* Changing a palette will refresh every object that references it.
* Moving a TileGrid will update both where it was and where it moved to.
* Adding something to a Group will refresh each individual area it
covers.
* Removing things from a Group will refresh one area that covers all
previous locations. (Not separate areas like add.)
* Setting a new top level Group will refresh the entire display.

Only TileGrid moves are optimized for overlap. All other overlaps
cause sending of duplicate pixels.

This also adds flip_x, flip_y and transpose_xy to TileGrid. They
change the direction of the pixels but not the location.

Fixes #1169. Fixes #1705. Fixes #1923.
2019-06-12 11:32:39 -07:00
sommersoft 9e4396bdcd
Merge pull request #1920 from tannewt/fix_rst
Improve rST consistency for rst2pyi use
2019-06-07 23:41:00 -05:00
Scott Shawcroft cfe24b8532
Improve rST consistency for rst2pyi use 2019-05-30 19:02:47 -07:00
Scott Shawcroft 3fad7de8db
Rework the pixel computation to use areas
This changes the displayio pixel computation from per-pixel to
per-area. This is precursor work to updating portions of the screen
(#1169). It should provide mild speedups because bounds checks are
done once per area rather than once per pixel. Filling by area also
allows TileGrid to maintain a row-associative fill pattern even when
the display's refresh is orthogonal to it.
2019-05-21 17:41:06 -07:00
Scott Shawcroft 5608e273a0
Add index and remove to Group. 2019-05-15 11:33:16 -07:00
Scott Shawcroft b7b55e0c0a
Make Group iterable via a generic native iterator.
Fixes #1694
2019-05-14 15:15:23 -07:00
Dan Halbert d3ce9280e2
Merge pull request #1883 from tannewt/fix_1881
Check native object in case of early access
2019-05-14 15:30:44 -04:00
Matt Land 0b1c1c1d92
Update Palette.c
Remove None, add in byte and bytearray examples
2019-05-14 08:03:34 -05:00
Scott Shawcroft f29de51325
Check native object in case of early access
If a native displayio object is accessed before it's super().__init__()
has been called, then a placeholder is given that will cause a crash if
accessed. This is tricky to get right so we detect this case and raise
a NotInplementedError instead of crashing.

Fixes #1881
2019-05-13 17:31:30 -07:00
Matt Land ad211b23be
add documentation of transparency 2019-05-10 17:35:51 -05:00
Matt Land 214dfed703
Add documentation for Palette shared binding
Add documentation for the palette subscript operator and how to use it.
2019-05-10 16:41:13 -05:00
Dan Halbert 0113e0970e add Display.__init__() args for brightness and auto_brightness 2019-04-18 15:59:16 -04:00
Dan Halbert 4fc0f8b25c Turn off auto_brightness if brightness is set 2019-04-18 13:57:27 -04:00
Scott Shawcroft 5028f87b09
Tweak pybadge and fix display bugs
* Update pybadge pins and flash for rev D
* TileGrid now validates the type of the pixel_shader.
* Display actually handles incoming subclass objects.
* MicroPython will inspect native parents to see if special
  accessors are used.
2019-04-09 18:32:52 -07:00
Scott Shawcroft de48e4b262
Merge remote-tracking branch 'adafruit/master' into fix_cpx_display 2019-04-08 17:15:08 -07:00
Scott Shawcroft 0f003ac5b8
Reorganize board busses into shared-bindings and shared-module. 2019-04-08 16:58:50 -07:00
Radomir Dopieralski 4b3cb7b6db Expose displayio.Display.bus
With the bus exposed, we can send custom commands to the display, to
leverage advanced features specific to the display, which are not
exposed by default.
2019-04-06 14:25:08 +02:00
Scott Shawcroft 04a4e8a38d
Always check TileGrid's x, y
When using an int index you could end up writing past the end of
TileGrid's memory.

Fixes #1747
2019-04-05 13:10:47 -07:00
Melissa LeBlanc-Williams 8f1fc6c07d Added option to easily treat SPI parameter data as commands 2019-04-04 23:15:00 -07:00
Melissa LeBlanc-Williams 2e0268cb09 Simplified cs toggling into fourwire only 2019-03-27 20:17:22 -07:00
Melissa LeBlanc-Williams f3ec0514cd Simplified into fourwire only 2019-03-27 20:11:32 -07:00
Melissa LeBlanc-Williams 2f7b338a4b Comment Cleanup 2019-03-26 18:56:25 -07:00
Melissa LeBlanc-Williams f4cede4747 Removed parameter so CS is always toggled 2019-03-26 18:46:13 -07:00
Melissa LeBlanc-Williams b2ad16f5c8 Removed parameter so CS is always toggled 2019-03-26 18:34:07 -07:00
Melissa LeBlanc-Williams 5f0e71ccb4 Merge branch 'master' of https://github.com/adafruit/circuitpython into ssd1351-fix 2019-03-26 18:23:02 -07:00
Melissa LeBlanc-Williams 0df40534f3 Merge branch 'master' of https://github.com/adafruit/circuitpython 2019-03-26 18:22:30 -07:00
Radomir Dopieralski 81fe8060d7 Properly calculate BPP for displayio.Bitmap
Fix #1669
2019-03-25 19:40:40 +01:00
Melissa LeBlanc-Williams c3329e224d Added Single Byte Boundaries option for certain displays 2019-03-24 23:59:28 -07:00
Melissa LeBlanc-Williams d9de1b9926 Updated RTD comment to reflect new param defaulting True 2019-03-24 08:23:46 -07:00
Melissa LeBlanc-Williams 0c33f7fdb4 Enable CS toggle for displayio by default 2019-03-23 20:23:23 -07:00
Melissa LeBlanc-Williams 2bb63cbeb3 Added new parameter description in displayio RTD comment 2019-03-23 18:53:04 -07:00
Melissa LeBlanc-Williams fadb5a1024 Added option to toggle cs in displayio init sequence 2019-03-23 18:34:42 -07:00
Scott Shawcroft 4b0afc855d
Fix up sphinx 2019-03-19 18:37:41 -07:00
Scott Shawcroft 5e2fec714c
Move Glyph and BuiltinFont into fontio
It was confusing in displayio.

Fixes #1662
2019-03-19 16:22:09 -07:00
Scott Shawcroft afbf59019e
Update displayio docs to add detail to display bus comments
Fixes #1599
2019-03-12 17:18:33 -07:00
Scott Shawcroft 224e9b1009
Standardize TileGrid to x and y properties over position
This brings it inline with Group. Also fixes #1613

This also includes a number of fixes for where a method is called
through a subclass. We now correctly get the native object.
Fixes #1567

Lastly, this adds subscript support to TileGrid for changing tile
indices. Similar to Bitmap, it accepts ints or 2-tuples.
2019-03-12 17:18:33 -07:00