mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Corrected type of json array value index
Former-commit-id: f766365fc3be4d1b62c36ce05e8a6d818f73dede
This commit is contained in:
parent
7292922309
commit
f83802f2b1
@ -197,7 +197,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
|
|||||||
const bool switchOffOnBlack = deviceConfig.get("switchOffOnBlack", true).asBool();
|
const bool switchOffOnBlack = deviceConfig.get("switchOffOnBlack", true).asBool();
|
||||||
const int transitiontime = deviceConfig.get("transitiontime", 1).asInt();
|
const int transitiontime = deviceConfig.get("transitiontime", 1).asInt();
|
||||||
std::vector<unsigned int> lightIds;
|
std::vector<unsigned int> lightIds;
|
||||||
for (size_t i = 0; i < deviceConfig["lightIds"].size(); i++) {
|
for (Json::Value::ArrayIndex i = 0; i < deviceConfig["lightIds"].size(); i++) {
|
||||||
lightIds.push_back(deviceConfig["lightIds"][i].asInt());
|
lightIds.push_back(deviceConfig["lightIds"][i].asInt());
|
||||||
}
|
}
|
||||||
device = new LedDevicePhilipsHue(output, username, switchOffOnBlack, transitiontime, lightIds);
|
device = new LedDevicePhilipsHue(output, username, switchOffOnBlack, transitiontime, lightIds);
|
||||||
|
Loading…
Reference in New Issue
Block a user