Item Refactor complete
This commit is contained in:
parent
219fbfb4c7
commit
24c168cf64
17 changed files with 78 additions and 41 deletions
|
|
@ -7,7 +7,7 @@ PowerItem::PowerItem(uint32_t itemIdIn, QString name, uint8_t value, QObject* p
|
|||
Item(itemIdIn, name, value, parent)
|
||||
{
|
||||
stateChanged(Sensor(Sensor::TYPE_SHUTDOWN_IMMINENT, 0, 0, "Shutdown Imminent", true));
|
||||
PowerItem::setValue(true);
|
||||
value_ = true;
|
||||
hidden_ = true;
|
||||
type_ = ITEM_VALUE_NO_VALUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ void Relay::enactValue(uint8_t value)
|
|||
}
|
||||
}
|
||||
|
||||
void Relay::toggle()
|
||||
{
|
||||
value_ ? off() : on();
|
||||
}
|
||||
|
||||
void Relay::store(QJsonObject& json)
|
||||
{
|
||||
json["Type"] = "Relay";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue