out_motor.h
Go to the documentation of this file.
#pragma once
#include "options.h"
#ifndef MOTOR_DISABLE
#include <abstractout.h>
#include <item.h>
#include "itemCmd.h"
#ifndef POS_ERR
#define POS_ERR 10
#endif
#define MIN_PWM 70
// The number of simultaniusly working motors
#ifndef MOTOR_QUOTE
#define MOTOR_QUOTE 1
#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 getDefaultStorageType(){return ST_PERCENTS255;};
//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;
bool inverted;
protected:
void getConfig();
};
#endif
out_Motor::pinFeedback
int8_t pinFeedback
Definition: out_motor.h:36
itemCmd.h
itemCmd
Definition: itemCmd.h:153
out_Motor::getDefaultStorageType
int getDefaultStorageType()
Definition: out_motor.h:30
out_Motor::inverted
bool inverted
Definition: out_motor.h:40
out_Motor::feedbackClosed
uint16_t feedbackClosed
Definition: out_motor.h:39
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:38
out_Motor::Status
int Status() override
Definition: out_motor.cpp:82
ST_PERCENTS255
#define ST_PERCENTS255
Definition: itemCmd.h:83
out_Motor::Setup
int Setup() override
Remove?? Now getChanType used instead.
Definition: out_motor.cpp:49
out_Motor
Definition: out_motor.h:20
out_Motor::pinDown
int8_t pinDown
Definition: out_motor.h:35
Item
Definition: item.h:104
out_Motor::pinUp
int8_t pinUp
Definition: out_motor.h:34
abstractout.h
out_Motor::maxOnTime
int16_t maxOnTime
Definition: out_motor.h:37
out_Motor::Stop
int Stop() override
Definition: out_motor.cpp:71
MOTOR_QUOTE
#define MOTOR_QUOTE
Definition: out_motor.h:15
out_Motor::Ctrl
int Ctrl(itemCmd cmd, char *subItem=NULL, bool toExecute=true) override
Definition: out_motor.cpp:263
out_Motor::getChanType
int getChanType() override
Definition: out_motor.cpp:256
out_Motor::out_Motor
out_Motor(Item *_item)
Definition: out_motor.h:23
out_Motor::Poll
int Poll(short cause) override
Definition: out_motor.cpp:102
item.h