ocupancy sensor now uses libnl to collect connected devices
fixed regulator saving values as int instead of double
This commit is contained in:
parent
772d21a982
commit
b0b4a985e9
15 changed files with 93 additions and 44 deletions
|
|
@ -13,7 +13,7 @@ class Relay : public Item
|
|||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Microcontroller* micro_;
|
||||
static Microcontroller* micro_;
|
||||
|
||||
uint8_t id_;
|
||||
uint16_t address_;
|
||||
|
|
@ -26,12 +26,14 @@ public slots:
|
|||
void toggle();
|
||||
|
||||
public:
|
||||
Relay(Microcontroller* micro, uint8_t id = 0, QString name = "", uint16_t address = 0, bool state = false, QObject* parent = nullptr);
|
||||
Relay(uint8_t id = 0, QString name = "", uint16_t address = 0, bool state = false, QObject* parent = nullptr);
|
||||
|
||||
uint16_t getAddress() const;
|
||||
uint8_t getId() const;
|
||||
void setId(uint8_t id);
|
||||
|
||||
inline static void setMicrocontroller(Microcontroller* micro){ micro_ = micro; }
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json, const bool preserve = false);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue