From fad59b54118d8567ff3fe9287feb30be7d673214 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 28 Aug 2015 14:52:28 +0200 Subject: [PATCH] fix id in device params --- plugins/deviceplugins/leynew/devicepluginleynew.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/deviceplugins/leynew/devicepluginleynew.cpp b/plugins/deviceplugins/leynew/devicepluginleynew.cpp index 6d1cf9d0..15be1f73 100644 --- a/plugins/deviceplugins/leynew/devicepluginleynew.cpp +++ b/plugins/deviceplugins/leynew/devicepluginleynew.cpp @@ -84,16 +84,17 @@ DeviceManager::DeviceError DevicePluginLeynew::executeAction(Device *device, con QByteArray binCode; - // TODO: find out how the ID will be calculated to bin code or make it discoverable + // TODO: find out how the id will be calculated to bin code or make it discoverable // ======================================= - // bincode depending on the ID - if (device->paramValue("ID") == "0115"){ + // bincode depending on the id + if (device->paramValue("id") == "0115"){ binCode.append("001101000001"); - } else if (device->paramValue("ID") == "0014") { + } else if (device->paramValue("id") == "0014") { binCode.append("110000010101"); - } else if (device->paramValue("ID") == "0008") { + } else if (device->paramValue("id") == "0008") { binCode.append("111101010101"); } else { + qCWarning(dcLeynew) << "Could not get id of device: invalid parameter" << device->paramValue("id"); return DeviceManager::DeviceErrorInvalidParameter; } @@ -145,7 +146,7 @@ DeviceManager::DeviceError DevicePluginLeynew::executeAction(Device *device, con } else if (action.actionTypeId() == fade7ActionTypeId) { binCode.append("001100000000"); } else { - return DeviceManager::DeviceErrorInvalidParameter; + return DeviceManager::DeviceErrorActionTypeNotFound; } // =======================================