Animation works with default animation
This commit is contained in:
@@ -64,6 +64,7 @@ void LEDDefinition_add(char *level, char *room, char *id, uint8_t red, uint8_t g
|
||||
ledDefinition[numberOfLEDDefinitions].level = level;
|
||||
ledDefinition[numberOfLEDDefinitions].room = room;
|
||||
ledDefinition[numberOfLEDDefinitions].id = id;
|
||||
ledDefinition[numberOfLEDDefinitions].onColor.name = "autoColor";
|
||||
ledDefinition[numberOfLEDDefinitions].onColor.red = red;
|
||||
ledDefinition[numberOfLEDDefinitions].onColor.green = green;
|
||||
ledDefinition[numberOfLEDDefinitions].onColor.blue = blue;
|
||||
@@ -72,6 +73,7 @@ void LEDDefinition_add(char *level, char *room, char *id, uint8_t red, uint8_t g
|
||||
LOG(LL_ERROR, ("Error: Too many LED Definitions to load, ignoring level=%s, room=%s, id=%s", level, room, id));
|
||||
}
|
||||
}
|
||||
|
||||
void LEDDefinition_init(int numberOfLeds, bool loadDefaultData) {
|
||||
// initialize
|
||||
numberOfLEDDefinitions = 0;
|
||||
@@ -95,3 +97,27 @@ void LEDDefinition_init(int numberOfLeds, bool loadDefaultData) {
|
||||
}
|
||||
}
|
||||
|
||||
char *LEDDefinition_getLevel(int ledNum) {
|
||||
ledNum = verifyLedDefinitionNum(ledNum);
|
||||
return ledDefinition[ledNum].level;
|
||||
}
|
||||
char *LEDDefinition_getRoom(int ledNum) {
|
||||
ledNum = verifyLedDefinitionNum(ledNum);
|
||||
return ledDefinition[ledNum].room;
|
||||
}
|
||||
char *LEDDefinition_getId(int ledNum) {
|
||||
ledNum = verifyLedDefinitionNum(ledNum);
|
||||
return ledDefinition[ledNum].id;
|
||||
}
|
||||
int LEDDefinition_getOnColorRed(int ledNum) {
|
||||
ledNum = verifyLedDefinitionNum(ledNum);
|
||||
return ledDefinition[ledNum].onColor.red;
|
||||
}
|
||||
int LEDDefinition_getOnColorGreen(int ledNum) {
|
||||
ledNum = verifyLedDefinitionNum(ledNum);
|
||||
return ledDefinition[ledNum].onColor.green;
|
||||
}
|
||||
int LEDDefinition_getOnColorBlue(int ledNum) {
|
||||
ledNum = verifyLedDefinitionNum(ledNum);
|
||||
return ledDefinition[ledNum].onColor.blue;
|
||||
}
|
||||
Reference in New Issue
Block a user