mirror of
https://github.com/anklimov/lighthub
synced 2025-12-07 04:09:49 +03:00
28 lines
566 B
C++
28 lines
566 B
C++
|
|
#pragma once
|
|
#include "options.h"
|
|
#ifndef RELAY_DISABLE
|
|
|
|
#include <abstractout.h>
|
|
#include <item.h>
|
|
|
|
class out_relay : public abstractOut {
|
|
public:
|
|
|
|
out_relay(Item * _item):abstractOut(_item){ getConfig();};
|
|
void getConfig();
|
|
void relay(bool state);
|
|
int Setup() override;
|
|
int Poll(short cause) override;
|
|
int Stop() override;
|
|
|
|
int getChanType() override;
|
|
int Ctrl(itemCmd cmd, char* subItem=NULL, bool toExecute=true, bool authorized = false) override;
|
|
|
|
protected:
|
|
short pin;
|
|
bool inverted;
|
|
uint32_t period;
|
|
};
|
|
#endif
|