Motor driver with feedback input (Airflow regulator Dospel)

items pulling reworked
This commit is contained in:
2019-11-03 03:31:32 +03:00
parent 23167b4f1c
commit c947c8bb4c
14 changed files with 383 additions and 49 deletions

View File

@@ -0,0 +1,32 @@
#pragma once
#include "options.h"
#ifndef MOTOR_DISABLE
#include <abstractout.h>
#include <item.h>
#ifndef POS_ERR
#define POS_ERR 2
#endif
class out_Motor : public abstractOut {
public:
out_Motor(Item * _item):abstractOut(_item){getConfig();};
int Setup() override;
int Poll(short cause) override;
int Stop() override;
int Status() override;
int isActive() override;
int getChanType() override;
int Ctrl(short cmd, short n=0, int * Parameters=NULL, boolean send=true, int suffixCode=0, char* subItem=NULL) override;
int8_t pinUp;
int8_t pinDown;
int8_t pinFeedback;
int16_t maxOnTime;
uint16_t feedbackOpen;
uint16_t feedbackClosed;
protected:
void getConfig();
};
#endif