mirror of
https://github.com/nymea/nymea-plugins.git
synced 2026-10-21 14:23:24 +02:00
fixed scene number conversion
This commit is contained in:
parent
e29afcb8e3
commit
b4197e8f23
@ -286,11 +286,11 @@ void LukeRoberts::onExternalApiEndpointCharacteristicChanged(const QLowEnergyCha
|
|||||||
if (characteristic.uuid() == m_externalApiEndpoint.uuid()) {
|
if (characteristic.uuid() == m_externalApiEndpoint.uuid()) {
|
||||||
qCDebug(dcLukeRoberts()) << "Data received" << value;
|
qCDebug(dcLukeRoberts()) << "Data received" << value;
|
||||||
}
|
}
|
||||||
|
uint8_t scene = static_cast<uint8_t>(value.at(2));
|
||||||
if (value.length() > 4) { //its a scene
|
if (value.length() > 4) { //its a scene
|
||||||
|
|
||||||
|
if (scene != 0xff) { //check it we are already at the end of the list
|
||||||
if (value.at(2) != 0xff) { //check it we are already at the end of the list
|
queryScene(scene);
|
||||||
queryScene(value.at(2));
|
|
||||||
} else {
|
} else {
|
||||||
emit sceneListReceived(m_sceneList);
|
emit sceneListReceived(m_sceneList);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user