light info has unique id no

This commit is contained in:
2025-08-30 21:38:24 +02:00
parent 14041120cd
commit 3c018ebba5
2 changed files with 27 additions and 10 deletions

View File

@@ -16,8 +16,8 @@ const struct {
Light::Light(Pin* pinR, Pin* pinG, Pin* pinB, std::string uniqueId)
: pinR(pinR), pinG(pinG), pinB(pinB), pinCW(nullptr), pinWW(nullptr) {
lightInfo.uniqueId = uniqueId;
: pinR(pinR), pinG(pinG), pinB(pinB), pinCW(nullptr), pinWW(nullptr), lightInfo(uniqueId) {
lightType = LightType::rgb;
uint8_t bits = pinR->getLedResolutionBits();
maxPwm = (bits >= 1 && bits <= 31) ? ((1u << bits) - 1u) : 255u;
@@ -25,8 +25,7 @@ Light::Light(Pin* pinR, Pin* pinG, Pin* pinB, std::string uniqueId)
}
Light::Light(Pin* pinR, Pin* pinG, Pin* pinB, Pin* pinCW, Pin* pinWW, std::string uniqueId)
: pinR(pinR), pinG(pinG), pinB(pinB), pinCW(pinCW), pinWW(pinWW) {
lightInfo.uniqueId = uniqueId;
: pinR(pinR), pinG(pinG), pinB(pinB), pinCW(pinCW), pinWW(pinWW), lightInfo(uniqueId) {
lightType = LightType::rgbww;
uint8_t bits = pinR->getLedResolutionBits();
maxPwm = (bits >= 1 && bits <= 31) ? ((1u << bits) - 1u) : 255u;