LEDs driver: slowmode optimization

* isValid() -> isOk()
* removed unneeded "lastBus != nullptr" checks
* re-enable lastBus optimization in getPixelColor() and getPixelColorRestored()
* remove duplicate checks for _valid== true from busses (already done at BusManager level)
This commit is contained in:
Frank
2025-01-16 20:58:32 +01:00
parent db2d50e6cd
commit 4221ed1859
2 changed files with 20 additions and 17 deletions

View File

@@ -190,7 +190,6 @@ class Bus {
inline uint8_t getAutoWhiteMode() const { return _autoWhiteMode; }
inline static void setGlobalAWMode(uint8_t m) { if (m < 5) _gAWM = m; else _gAWM = AW_GLOBAL_DISABLED; }
inline static uint8_t getGlobalAWMode() { return _gAWM; }
inline bool isValid() const {return _valid;}
inline static uint32_t restore_Color_Lossy(uint32_t c, uint8_t restoreBri) { // shamelessly grabbed from upstream, who grabbed from NPB, who ..
if (restoreBri < 255) {