Skip to content

[bug] Reversed behavior of color inversion on ST7789 displays #754

Open
@alvroble

Description

@alvroble

While testing the latest commits on the dev branch, I discovered that the color inversion functionality for ST7789 displays is working in reverse.

  • When OPTION__DISABLED is set, colors are inverted.
  • When OPTION__ENABLED is set, colors are not inverted.

This has no impact during first run since the inversion setting is not applied until its value is explicitly changed.

I verified that @kdmukai used the correct values according to the ST7789 datasheet

The settings flow for

self.command(0x21 if enabled else 0x20)
is also correct:

  • OPTION__ENABLED → invert(True)

  • OPTION__DISABLED → iinvert(False)

Surprisingly, if we swap the values for the inversion commands (0x20 and 0x21), the behavior aligns with what we expect, although that contradicts the datasheet.

This issue is to discuss whether this is a mistake on our side or a discrepancy/error (?) in the datasheet or specific ST7789 variants. I tested this on both a regular 240x240 and a 320x240 ST7789 displays.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions