unipi minor bug fix
This commit is contained in:
parent
5f52968dd2
commit
a3600f1ece
@ -754,7 +754,7 @@ void DevicePluginUniPi::onWebSocketTextMessageReceived(QString message)
|
||||
}
|
||||
|
||||
if (obj["dev"] == "temp") {
|
||||
qCDebug(dcUniPi()) << "Temperature Sensor:" << obj["typ"].toString() << "Address:" << obj["circuit"].toString() << "Value:" << obj["value"].toDouble() << "Connected:" << ~(QVariant(obj["lost"]).toBool());
|
||||
qCDebug(dcUniPi()) << "Temperature Sensor:" << obj["typ"].toString() << "Address:" << obj["circuit"].toString() << "Value:" << obj["value"].toDouble() << "Connected:" << !(QVariant(obj["lost"]).toBool());
|
||||
if (!m_temperatureSensors.contains(obj["circuit"].toString())){
|
||||
//New temperature sensor detected
|
||||
m_temperatureSensors.append(obj["circuit"].toString());
|
||||
@ -762,7 +762,7 @@ void DevicePluginUniPi::onWebSocketTextMessageReceived(QString message)
|
||||
//Updating states of already added temperature sensor
|
||||
if (m_usedTemperatureSensors.contains(obj["circuit"].toString())) {
|
||||
double value = QVariant(obj["value"]).toDouble();
|
||||
bool connected = ~(QVariant(obj["lost"]).toBool());
|
||||
bool connected = !(QVariant(obj["lost"]).toBool());
|
||||
Device *device = m_usedTemperatureSensors.value(obj["circuit"].toString());
|
||||
|
||||
if (device->deviceClassId() == temperatureSensorDeviceClassId) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user