mirror of
https://github.com/anklimov/lighthub
synced 2025-12-10 21:59:50 +03:00
HSV & RGB mixed control, starting with PID
This commit is contained in:
36
lighthub/modules/out_pid.h
Normal file
36
lighthub/modules/out_pid.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include "options.h"
|
||||
#ifndef PID_DISABLE
|
||||
#include <abstractout.h>
|
||||
#include <item.h>
|
||||
#include <PID_v1.h>
|
||||
|
||||
|
||||
class pidPersistent : public chPersistent {
|
||||
public:
|
||||
PID pid;
|
||||
double output;
|
||||
double input;
|
||||
int driverStatus;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class out_pid : public abstractOut {
|
||||
public:
|
||||
|
||||
out_pid(Item * _item):abstractOut(_item){store = (pidPersistent *) item->getPersistent();};
|
||||
int Setup() override;
|
||||
int Poll(short cause) override;
|
||||
int Stop() override;
|
||||
int Status() override;
|
||||
int isActive() override;
|
||||
int getChanType() override;
|
||||
int Ctrl(itemCmd cmd, char* subItem=NULL, bool toExecute=true) override;
|
||||
|
||||
|
||||
protected:
|
||||
pidPersistent * store;
|
||||
bool getConfig();
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user