mirror of
https://github.com/meshtastic/firmware.git
synced 2026-03-26 02:53:33 -04:00
De-duplicate Ambient LED management code (#5156)
We currently have 4 different places where we have the logic for modifying LED state of the various types of Ambient LEDs, ExternalNotificationModule::SetExternalOff ExternalNotificationModule::SetExternalOn AmbientLightingThread::setLighting AmbientLightingThread::setLightingOff This patch de-duplicates the methods in ExternalNotification to a single method, using a boolean to toggle whether we're turning things on or off.
This commit is contained in:
@@ -34,8 +34,7 @@ class ExternalNotificationModule : public SinglePortModule, private concurrency:
|
||||
|
||||
uint32_t nagCycleCutoff = 1;
|
||||
|
||||
void setExternalOn(uint8_t index = 0);
|
||||
void setExternalOff(uint8_t index = 0);
|
||||
void setExternalState(uint8_t index = 0, bool on = false);
|
||||
bool getExternal(uint8_t index = 0);
|
||||
|
||||
void setMute(bool mute) { isMuted = mute; }
|
||||
|
||||
Reference in New Issue
Block a user