Skip to content

[Bug] [EV3] hub.screen.clear() switches the leds to black #2599

@BertLindeman

Description

@BertLindeman

Describe the bug
Use of screen.clear() does not show the "running" led animations anymore.

To reproduce
Steps to reproduce the behavior:

  1. Run a program like this on the EV3
from pybricks import version
print(version)

from pybricks.hubs import EV3Brick
from pybricks.tools import wait, StopWatch
from pybricks.parameters import Color, Direction, Port

hub = EV3Brick()

print("do clear")
hub.screen.clear()
wait(1000)
hub.light.on(Color.RED)
wait(1000)
hub.light.on(Color.GREEN)
wait(1000)
print("done")
  1. Observe the led lights on the hub. No more fading green leds.

Expected behavior
What did you expect to happen instead?
To see the "running" animation until the program sets another color.

Screenshots
There is a saying that a picture is worth a 1000 words. Screenshots really help to identify and solve problems.

[EDIT}:
extra info
In the text above I only thought of the "running animation" by the leds, but there also is a "running animation" on screen.
Maybe this commit eacea37 is the culprit

From pybricks/parameters/pb_type_image.c:

            // At the moment, platforms with a display have at most one
            // animation so we can use the generic stop all method. In the
            // future, we could tie animations to a screen or image instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: EV3Issues related to LEGO MINDSTORMS EV3software: pybricks-micropythonIssues with Pybricks MicroPython firmware (or EV3 runtime)topic: displayIssues related to graphical displaystopic: lightsIssues involving lights

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions