small cleanup
This commit is contained in:
parent
ed74a4fc83
commit
ddd0b3a732
@ -1,19 +0,0 @@
|
||||
#include "auxitem.h"
|
||||
|
||||
AuxItem::AuxItem(Microcontroller* micro, uint32_t itemIdIn, QString name, uint8_t value,
|
||||
QObject* parent): Item(itemIdIn, name, value, parent), micro_(micro)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void AuxItem::setValue(uint8_t value)
|
||||
{
|
||||
Item::setValue(value);
|
||||
micro_->setAuxPwm(value);
|
||||
}
|
||||
|
||||
void AuxItem::store(QJsonObject &json)
|
||||
{
|
||||
json["Type"] = "Aux";
|
||||
Item::store(json);
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "item.h"
|
||||
#include "../microcontroller.h"
|
||||
|
||||
class AuxItem: public Item
|
||||
{
|
||||
Q_OBJECT
|
||||
private:
|
||||
Microcontroller* micro_;
|
||||
|
||||
public slots:
|
||||
|
||||
virtual void setValue(uint8_t value);
|
||||
|
||||
public:
|
||||
AuxItem(Microcontroller* micro, uint32_t itemIdIn = QRandomGenerator::global()->generate(), QString name = "",
|
||||
uint8_t value = 0, QObject* parent = nullptr);
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
};
|
@ -19,15 +19,8 @@
|
||||
|
||||
class Microcontroller : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
static constexpr char AMP_RELAY = 0;
|
||||
static constexpr char SENSOR_TEMPERATURE = 1;
|
||||
static constexpr char SENSOR_DOOR = 0 ;
|
||||
|
||||
private:
|
||||
|
||||
static constexpr int TRAIN_LIST = 1;
|
||||
@ -80,7 +73,7 @@ signals:
|
||||
void textRecived(const QString string);
|
||||
void itemChanged(ItemData relay);
|
||||
void auxStateChanged(int value);
|
||||
void gotItemList(std::vector< std::shared_ptr<Item> >&);
|
||||
void gotItemList(std::vector<std::shared_ptr<Item>>&);
|
||||
};
|
||||
|
||||
#endif // MICROCONTROLLER_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user