Skip to content

LedLayout is not considering Led Hardware setup #673

@Lord-Grey

Description

@Lord-Grey

Unfortunately, the Led-Layout is not considering the maximum Leds available by the LedDevice.
In the code, even the number of Leds defined by the layout is considered valid when it is bigger than the number of Hardware Leds.

_hwLedCount = qMax(unsigned(getSetting(settings::DEVICE).object()["hardwareLedCount"].toInt(getLedCount())), getLedCount());

This currently leads to the situation, that more Led updates are written than a Led-Device supports (i.e. unexpected behaviour) , as well as some other negative side effects.
A layout which has less or equal number of Leds as the Led-Device defined, is not a problem given that missing values are already filled.
The current way of handling layout and device independently is not very user friendly, as it does not provide a clear configuration framework (which avoids error scenarios).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions