Skip to content

Commit 78f073c

Browse files
authored
Merge pull request #5138 from jepler/refresh-defaults
Displayio: change refresh minimum_frames_per_second default to 0
2 parents d294692 + a89f1c8 commit 78f073c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

shared-bindings/displayio/Display.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,14 +230,14 @@ STATIC mp_obj_t displayio_display_obj_show(mp_obj_t self_in, mp_obj_t group_in)
230230
}
231231
MP_DEFINE_CONST_FUN_OBJ_2(displayio_display_show_obj, displayio_display_obj_show);
232232

233-
//| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 1) -> bool:
233+
//| def refresh(self, *, target_frames_per_second: Optional[int] = None, minimum_frames_per_second: int = 0) -> bool:
234234
//| """When auto refresh is off, waits for the target frame rate and then refreshes the display,
235235
//| returning True. If the call has taken too long since the last refresh call for the given
236236
//| target frame rate, then the refresh returns False immediately without updating the screen to
237237
//| hopefully help getting caught up.
238238
//|
239239
//| If the time since the last successful refresh is below the minimum frame rate, then an
240-
//| exception will be raised. Set ``minimum_frames_per_second`` to 0 to disable.
240+
//| exception will be raised. The default ``minimum_frames_per_second`` of 0 disables this behavior.
241241
//|
242242
//| When auto refresh is off, ``display.refresh()`` or ``display.refresh(target_frames_per_second=None)``
243243
//| will update the display immediately.
@@ -254,7 +254,7 @@ STATIC mp_obj_t displayio_display_obj_refresh(size_t n_args, const mp_obj_t *pos
254254
enum { ARG_target_frames_per_second, ARG_minimum_frames_per_second };
255255
static const mp_arg_t allowed_args[] = {
256256
{ MP_QSTR_target_frames_per_second, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = mp_const_none} },
257-
{ MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 1} },
257+
{ MP_QSTR_minimum_frames_per_second, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
258258
};
259259

260260
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];

0 commit comments

Comments
 (0)