8000 Documentation update for Display.refresh() · domdfcoding/circuitpython@b3aea21 · GitHub
[go: up one dir, main page]

Skip to content

Commit b3aea21

Browse files
Documentation update for Display.refresh()
Update the documentation for `Display.refresh()` which had two paragraphs starting 'When auto refresh is off,'
1 parent 4922e67 commit b3aea21

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

shared-bindings/displayio/Display.c

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -230,22 +230,23 @@ STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in)
230230
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show);
231231

232232
//| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 0) -> bool:
233-
//| """When auto refresh is off, waits for the target frame rate and then refreshes the display,
234-
//| returning True. If the call has taken too long since the last refresh call for the given
235-
//| target frame rate, then the refresh returns False immediately without updating the screen to
233+
//| """When auto_refresh is off, and :py:attr:`target_frames_per_second` is not `None` this waits
234+
//| for the target frame rate and then refreshes the display,
235+
//| returning `True`. If the call has taken too long since the last refresh call for the given
236+
//| target frame rate, then the refresh returns `False` immediately without updating the screen to
236237
//| hopefully help getting caught up.
237238
//|
238239
//| If the time since the last successful refresh is below the minimum frame rate, then an
239-
//| exception will be raised. The default ``minimum_frames_per_second`` of 0 disables this behavior.
240+
//| exception will be raised. The default :py:attr:`minimum_frames_per_second` of 0 disables this behavior.
240241
//|
241-
//| When auto refresh is off, ``display.refresh()`` or ``display.refresh(target_frames_per_second=None)``
242+
//| When auto_refresh is off, and :py:attr:`target_frames_per_second` is `None` this
242243
//| will update the display immediately.
243244
//|
244-
//| When auto refresh is on, updates the display immediately. (The display will also update
245+
//| When auto_refresh is on, updates the display immediately. (The display will also update
245246
//| without calls to this.)
246247
//|
247-
//| :param int target_frames_per_second: How many times a second `refresh` should be called and the screen updated.
248-
//| Set to `None` for immediate refresh.
248+
//| :param Optional[int] target_frames_per_second: The target frame rate that :py:func:`refresh` should try to
249+
//| achieve. Set to `None` for immediate refresh.
249250
//| :param int minimum_frames_per_second: The minimum number of times the screen should be updated per second."""
250251
//| ...
251252
//|

0 commit comments

Comments
 (0)
0