Skip to content

Conversation

@GiantRobato
Copy link

@GiantRobato GiantRobato commented Feb 26, 2019

Tested with the following:

import time
import board
import displayio

print(board.DISPLAY.width())
print(board.DISPLAY.height())

relates to #1588

@siddacious
Copy link

It also looks like Travis failed due to reasons beyond your/my control. @dhalbert any ideas?

@GiantRobato
Copy link
Author

@siddacious thanks for the references! I couldn't figure out what the correct type i needed in order to make it show as a property. I don't have the board I was working on anymore (just finished with the pycascades sprint) but I have a pyportal coming in the mail soon so I can update with the requested changes.

@dhalbert
Copy link
Collaborator

The Travis issues are https://git.savannah.gnu.org/ being flaky, which is relatively common. I'll restart those jobs.

@siddacious
Copy link

Looks great!

Adafruit CircuitPython 4.0.0-beta.2-174-g0ac40235b-dirty on 2019-03-02; Adafruit PyPortal with samd51j20
>>> import board
>>> board.DISPLAY.height
240
>>> board.DISPLAY.width
320

siddacious
siddacious previously approved these changes Mar 2, 2019
@siddacious
Copy link

Someone else will have to merge but this looks good to go. @dhalbert?

Copy link
Collaborator

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the uint16_t stuff. Looks good!

bool common_hal_displayio_display_get_auto_brightness(displayio_display_obj_t* self);
void common_hal_displayio_display_set_auto_brightness(displayio_display_obj_t* self, bool auto_brightness);

mp_int_t common_hal_displayio_display_get_width(displayio_display_obj_t* self);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use uint16_t here instead of mp_int_t, because that's the type of width and height that are passed in.

@dhalbert
Copy link
Collaborator

dhalbert commented Mar 6, 2019

Great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants