self._start_sequence = start_sequence
self._start_up_time = start_up_time
self._stop_sequence = stop_sequence
self._start_sequence = start_sequence
self._start_up_time = start_up_time
self._stop_sequence = stop_sequence
def show(self, group: Group) -> None:
# pylint: disable=unnecessary-pass
def show(self, group: Group) -> None:
# pylint: disable=unnecessary-pass
- """Switches to displaying the given group of layers. When group is None, the default
+ """
+ .. note:: `show()` is deprecated and will be removed when CircuitPython 9.0.0
+ is released. Use ``.root_group = group`` instead.
+
+ Switches to displaying the given group of layers. When group is None, the default
CircuitPython terminal will be shown (eventually).
"""
if group is None:
group = circuitpython_splash
self._core.set_root_group(group)
CircuitPython terminal will be shown (eventually).
"""
if group is None:
group = circuitpython_splash
self._core.set_root_group(group)
# Run stop sequence but don't wait for busy because busy is set when sleeping
self._send_command_sequence(False, self._stop_sequence)
# Run stop sequence but don't wait for busy because busy is set when sleeping
self._send_command_sequence(False, self._stop_sequence)
# If there is no overlap then we're done.
if not self._core.clip_area(area, clipped):
return True
# If there is no overlap then we're done.
if not self._core.clip_area(area, clipped):
return True
- clipped.x1,
- clipped.y1 + rows_per_buffer * subrect_index,
- clipped.x2,
- clipped.y1 + rows_per_buffer * (subrect_index + 1),
+ x1=clipped.x1,
+ y1=clipped.y1 + rows_per_buffer * subrect_index,
+ x2=clipped.x2,
+ y2=clipped.y1 + rows_per_buffer * (subrect_index + 1),
- buffer = memoryview(bytearray([0] * (buffer_size * 4)))
- mask = memoryview(bytearray([0] * mask_length))
+ buffer = memoryview(bytearray([0] * (buffer_size * 4))).cast("I")
+ mask = memoryview(bytearray([0] * (mask_length * 4))).cast("I")
if (pass_index == 1 and self._color_bits_inverted) or (
pass_index == 0 and self._black_bits_inverted
):
if (pass_index == 1 and self._color_bits_inverted) or (
pass_index == 0 and self._black_bits_inverted
):
buffer[i] = ~buffer[i]
if not self._core.begin_transaction():
# Can't acquire display bus; skip the rest of the data. Try next display.
return False
self._core.send(
buffer[i] = ~buffer[i]
if not self._core.begin_transaction():
# Can't acquire display bus; skip the rest of the data. Try next display.
return False
self._core.send(
def _finish_refresh(self) -> None:
# Actually refresh the display now that all pixel RAM has been updated
def _finish_refresh(self) -> None:
# Actually refresh the display now that all pixel RAM has been updated
if transposed != will_transposed:
self._core.width, self._core.height = self._core.height, self._core.width
self._core.set_rotation(value)
if transposed != will_transposed:
self._core.width, self._core.height = self._core.height, self._core.width
self._core.set_rotation(value)
"""The root group on the epaper display.
If the root group is set to ``None``, no output will be shown.
"""
"""The root group on the epaper display.
If the root group is set to ``None``, no output will be shown.
"""