circuitpython/shared-module
Jeff Epler 71c63c2812 FramebufferDisplay: Don't set rotation via core_construct
The expectations of displayio.Display and frambufferio.FramebufferDisplay
are different when it comes to rotation.

In displayio.Display, if you call core_construct with a WxH = 64x32
and rotation=90, you get something that is 32 pixels wide and 64 pixels
tall in the LCD's coordinate system.

This is fine, as the existing definitions were written to work like this.
With framebuffer displays, however, the underlying framebuffer (such as
RGBMatrix) says "I am WxH pixels wide in my coordinate system" and the
constructor is given a rotation; when the rotation indicates a transpose
that means "exchange rows and columns, so that to the Groups displayed
on it, there is an effectively HxW pixel region for use".

Happily, we already have a set_rotation method.  Thus (modulo the time
spent debugging things anyway:) the fix is simple: Always request no
rotation from core_construct, then immediately fix up the rotation
to match what was requested.

Testing performed: 32x16 RGBMatrix on Metro M4 Express (but using
the Airlift firmware, as this is the configuration the error was reported
on):
 * initially construct display at 0, 90, 180, 270 degrees
 * later change angle to 0, 90, 180, 270 degrees
 * no garbled display
 * no safe mode crashes
2020-09-01 11:00:22 -05:00
..
_bleio remove debugging prints 2020-06-15 18:10:34 -04:00
_eve Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
_pixelbuf use the stack 2020-08-10 18:42:05 -04:00
_stage circuitpython-stage: allow choosing background color 2020-01-30 15:24:04 +01:00
aesio aesio: add basic AES encryption and decryption 2020-05-06 17:40:06 +08:00
audiocore audiocore: The arguments to reset_buffer went missing 2019-12-13 18:31:12 -06:00
audioio bring MixerVoice back to building state; update documentation 2019-08-03 11:20:06 -05:00
audiomixer audiomixer: Fix garbled playback when voice 0 is stopped, audio pops 2020-06-01 19:14:38 -05:00
audiomp3 MP3Decoder: take advantage of background callback 2020-07-15 09:26:47 -05:00
audiopwmio audiopwmio: Add the shared files for this new module 2019-07-26 07:52:37 -05:00
bitbangio Add license to some obvious files. 2020-07-06 19:16:25 +01:00
board Fix build error for \!DISPLAY 2020-08-18 10:03:45 -05:00
busio add timeout keyword to I2C - for bitbangio - ignored for busio 2018-05-13 21:54:44 -04:00
displayio Merge remote-tracking branch 'adafruit/main' into add_pwmio 2020-08-24 18:25:18 -07:00
fontio Move Glyph and BuiltinFont into fontio 2019-03-19 16:22:09 -07:00
framebufferio FramebufferDisplay: Don't set rotation via core_construct 2020-09-01 11:00:22 -05:00
gamepad Gamepad & GamepadShift: Enable ticks while object exists 2020-05-13 10:14:37 -05:00
gamepadshift Gamepad & GamepadShift: Enable ticks while object exists 2020-05-13 10:14:37 -05:00
memorymonitor remove other extraneous files 2020-08-21 19:10:13 -05:00
multiterminal Merge tag 'v1.9.3' 2017-11-02 12:41:50 -07:00
network Add license to some obvious files. 2020-07-06 19:16:25 +01:00
os Add license to some obvious files. 2020-07-06 19:16:25 +01:00
random Introduce a random module that is a subset of CPython's random. It 2017-06-27 17:37:24 -07:00
rgbmatrix rgbmatrix: Disable timer while reconstructing the display 2020-09-01 11:00:22 -05:00
sdcardio remove extraneous files 2020-08-21 19:08:25 -05:00
sharpdisplay sharpdisplay: Make PARTIAL_UPDATES unconditional 2020-08-12 13:01:43 -05:00
socket modify modnetwork and modusocket for circuitpython 2018-10-04 22:02:25 +10:00
storage Merge pull request #3223 from dhalbert/unmount-before-reset 2020-07-29 10:47:24 -07:00
struct struct.pack_into incorrect buffer size check 2019-01-21 11:45:38 -05:00
terminalio fix terminalio not clearing on construct 2019-08-08 14:58:51 -04:00
time Fix up Spresense build. It doesn't sleep. 2020-03-17 14:21:45 -07:00
touchio Claim USB pins at startup to prevent overwrites 2020-07-22 14:22:05 -04:00
uheap uheap: Switch to using gc_nbytes to measure allcoation size so we stop undercounting. 2016-11-23 17:32:50 -08:00
usb_hid First try at lowering the power consumption 2020-03-13 11:12:30 -07:00
usb_midi update tinyusb lib to 0.5.x 2019-07-24 16:46:31 +07:00
ustack Fix up end of file and trailing whitespace. 2020-06-03 10:56:35 +01:00
vectorio use top-left heuristic for vectorio.Polygon 2020-07-28 23:10:59 -07:00
wiznet Add license to some obvious files. 2020-07-06 19:16:25 +01:00