Sensors now work over broadcast pipe

Added Polynomal actor
Added Item adding dialog
Added Factor Actor
This commit is contained in:
Carl Klemm 2020-02-04 22:56:10 +01:00
parent f6aaebafc6
commit 772d21a982
63 changed files with 1450 additions and 225 deletions

View file

@ -2,9 +2,9 @@
#include <QProcess>
#include <QApplication>
PowerItem::PowerItem(SensorStore* sensors, uint32_t itemIdIn, QString name, uint8_t value, QObject* parent): Item(sensors, itemIdIn, name, value, parent)
PowerItem::PowerItem(uint32_t itemIdIn, QString name, uint8_t value, QObject* parent): Item(itemIdIn, name, value, parent)
{
stateChanged(Sensor(Sensor::TYPE_SHUTDOWN_IMMINENT, 0, 0));
stateChanged(Sensor(Sensor::TYPE_SHUTDOWN_IMMINENT, 0, 0, "Shutdown Imminent", true));
setValue(true);
}
@ -14,7 +14,7 @@ void PowerItem::setValue(uint8_t value)
if(!value)
{
QTimer::singleShot(5000, this, &PowerItem::timeout);
stateChanged(Sensor(Sensor::TYPE_SHUTDOWN_IMMINENT, 0, 1));
stateChanged(Sensor(Sensor::TYPE_SHUTDOWN_IMMINENT, 0, 1, "Shutdown Imminent", true));
}
}