Commit 447c4d81 authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

Don't update SensorsFeatureSensor if it is not subscribed

It's not very useful if no one is listening.

(cherry picked from commit 14e0bffb)
parent d9fc16b1
......@@ -141,6 +141,10 @@ SensorsFeatureSensor::SensorsFeatureSensor(const QString &id,
void SensorsFeatureSensor::update()
if (!isSubscribed()) {
double value;
if (sensors_get_value(m_chipName, m_valueFeature->number, &value) < 0) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment