fixed scene number conversion

This commit is contained in:
Boernsman 2019-10-18 16:27:58 +02:00 committed by Boernsman
parent e29afcb8e3
commit b4197e8f23

View File

@ -286,11 +286,11 @@ void LukeRoberts::onExternalApiEndpointCharacteristicChanged(const QLowEnergyCha
if (characteristic.uuid() == m_externalApiEndpoint.uuid()) {
qCDebug(dcLukeRoberts()) << "Data received" << value;
}
uint8_t scene = static_cast<uint8_t>(value.at(2));
if (value.length() > 4) { //its a scene
if (value.at(2) != 0xff) { //check it we are already at the end of the list
queryScene(value.at(2));
if (scene != 0xff) { //check it we are already at the end of the list
queryScene(scene);
} else {
emit sceneListReceived(m_sceneList);
}