Fix bug that prevented aquireing new items
Add save button to master that saves json file Remove autosave on quit
This commit is contained in:
parent
5fb9ca7cc0
commit
954eec754c
14 changed files with 61 additions and 18 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "poweritem.h"
|
||||
#include <QProcess>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
|
||||
PowerItem::PowerItem(uint32_t itemIdIn, QString name, uint8_t value, QObject* parent): Item(itemIdIn, name, value, parent)
|
||||
{
|
||||
|
|
@ -10,6 +11,7 @@ PowerItem::PowerItem(uint32_t itemIdIn, QString name, uint8_t value, QObject* p
|
|||
|
||||
void PowerItem::setValue(uint8_t value)
|
||||
{
|
||||
qDebug()<<"shutdown";
|
||||
Item::setValue(value);
|
||||
if(!value)
|
||||
{
|
||||
|
|
@ -20,6 +22,7 @@ void PowerItem::setValue(uint8_t value)
|
|||
|
||||
void PowerItem::timeout()
|
||||
{
|
||||
qDebug()<<"shutdown timeout";
|
||||
QProcess::startDetached("syncoff");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue