Commit Graph

38 Commits

Author SHA1 Message Date
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
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
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
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
Dan Halbert
0113e0970e add Display.__init__() args for brightness and auto_brightness 2019-04-18 15:59:16 -04:00
Melissa LeBlanc-Williams
97baa7899f Added comment regarding parameter loop 2019-04-05 11:11:27 -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
f1e4a2ffb9 Removed unnecessary bit-ANDing 2019-04-01 19:52:35 -07:00
Melissa LeBlanc-Williams
8b4ca24e56 Improved readability of Single Byte Bounds code 2019-03-31 14:17:54 -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
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
a54493b4ae Added small delay inside toggle for edge cases 2019-03-26 07:45:17 -07:00
Melissa LeBlanc-Williams
09a1f06bbf Added small delay inside toggle for edge cases 2019-03-26 07:39:40 -07:00
Melissa LeBlanc-Williams
cc96c39e6d Fixed wrong operator 2019-03-25 23:58:58 -07:00
Melissa LeBlanc-Williams
c3329e224d Added Single Byte Boundaries option for certain displays 2019-03-24 23:59:28 -07:00
Melissa LeBlanc-Williams
b25c4baeec Moving Toggle to before command fixes driver issue 2019-03-23 21:04:25 -07:00
Melissa LeBlanc-Williams
fadb5a1024 Added option to toggle cs in displayio init sequence 2019-03-23 18:34:42 -07:00
Dan Halbert
1f31877d55 Rework background display task to allow reads from SPI SD card during display. Clarify code. Handle multiple displays better. 2019-03-07 00:08:16 -05:00
Dan Halbert
c854f6617a check display-bus transaction status and act accordingly 2019-03-06 13:45:48 -05:00
Dan Halbert
2eaa98ad71
Merge pull request #1601 from penguindustin/master
added height and width attributes for displayio
2019-03-06 12:43:55 -05:00
Dustin Mendoza
4145f87fcd changed from mp_int_t to uint16_t 2019-03-05 21:25:09 -08:00
Dan Halbert
ced37c1001 Don't wait for display frame if interrupt pending 2019-02-28 22:36:50 -05:00
Dustin Mendoza
f127be4dd2 added height and width attributes for displayio 2019-02-25 16:39:20 -08:00
Scott Shawcroft
08158a7c34
Tweak the backlight PWM rate to be higher that audio range. Fixes #1571 2019-02-21 12:02:01 -08:00
Scott Shawcroft
448ae64d8e
Add support for display rotation and raw commands
Display rotation is relative to the scan order of the display.
The scan order can be found by scrolling the display with command
0x37 `display_bus.send(0x37, struct.pack(">H", i % 128))`

Fixes #1504
2019-02-01 00:32:03 -08:00
Scott Shawcroft
354a26963b
Correctly handle no backlight pin. 2019-01-31 11:42:15 -08:00
Scott Shawcroft
601a910f4e
More improvements to Terminal:
* Fix Hallowing.
* Fix builds without displayio.
* Fix y bounds that appears as untrollable row of pixels.
* Add scrolling to TileGrid.
* Remove Sprite to save space. TileGrid is a drop in replacement.
2019-01-31 11:42:14 -08:00
Scott Shawcroft
6145f08cc8
Support adjustable backlight brightness 2019-01-31 11:42:14 -08:00
Scott Shawcroft
69bc5e189b
Rudamentary backlight support 2019-01-31 11:42:14 -08:00
Scott Shawcroft
1a1dbef992
Hook up the terminal based on the first display. 2019-01-31 11:42:14 -08:00
Scott Shawcroft
3139d0dc20
Use common delay function during display init so we don't starve background tasks. 2019-01-23 14:43:54 -08:00
Scott Shawcroft
2d136d58bf
Fix other builds and hallowing 2019-01-17 14:45:29 -08:00
Scott Shawcroft
05d8885a1a
Rework displays in prep for dynamic support and 8bit parallel. 2019-01-16 12:05:20 -08:00