# LightHub: out_motor.h Source File

out_motor.h
Go to the documentation of this file.
#pragma once
#include "options.h"
#ifndef MOTOR_DISABLE
#include <abstractout.h>
#include <item.h>
#ifndef POS_ERR
#define POS_ERR 2
#endif
// The number of simultaniusly working motors
#ifndef MOTOR_QUOTE
#define MOTOR_QUOTE 2
#endif
static int8_t motorQuote = MOTOR_QUOTE;
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, int suffixCode=0, char* subItem=NULL) override;
int Ctrl(itemCmd cmd, char* subItem=NULL, bool toExecute=true) override;
int8_t pinUp;
int8_t pinDown;
int8_t pinFeedback;
int16_t maxOnTime;
uint16_t feedbackOpen;
uint16_t feedbackClosed;
protected:
void getConfig();
};
#endif
out_Motor::pinFeedback
int8_t pinFeedback
Definition: out_motor.h:33
itemCmd
Definition: itemCmd.h:173
out_Motor::isActive
int isActive() override
Definition: out_motor.cpp:67
out_Motor::feedbackClosed
uint16_t feedbackClosed
Definition: out_motor.h:36
options.h
abstractOut
Definition: abstractout.h:8
out_Motor::getConfig
void getConfig()
Definition: out_motor.cpp:13
out_Motor::feedbackOpen
uint16_t feedbackOpen
Definition: out_motor.h:35
out_Motor::Status
int Status() override
Definition: out_motor.cpp:62
out_Motor::Setup
int Setup() override
Definition: out_motor.cpp:35
out_Motor
Definition: out_motor.h:18
out_Motor::pinDown
int8_t pinDown
Definition: out_motor.h:32
Item
Definition: item.h:93
out_Motor::pinUp
int8_t pinUp
Definition: out_motor.h:31
abstractout.h
out_Motor::maxOnTime
int16_t maxOnTime
Definition: out_motor.h:34
out_Motor::Stop
int Stop() override
Definition: out_motor.cpp:52
MOTOR_QUOTE
#define MOTOR_QUOTE
Definition: out_motor.h:13
out_Motor::Ctrl
int Ctrl(itemCmd cmd, char *subItem=NULL, bool toExecute=true) override
Definition: out_motor.cpp:214
out_Motor::getChanType
int getChanType() override
Definition: out_motor.cpp:207
out_Motor::out_Motor
out_Motor(Item *_item)
Definition: out_motor.h:21
out_Motor::Poll
int Poll(short cause) override
Definition: out_motor.cpp:72
item.h