mainloop/* moved to root
This commit is contained in:
25
pidcont.h
Normal file
25
pidcont.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2022 Oleg Borodin <borodin@unix7.org>
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef PIDCONT_H_QWERTY
|
||||
#define PIDCONT_H_QWERTY
|
||||
|
||||
|
||||
typedef struct {
|
||||
double perror;
|
||||
double integ;
|
||||
|
||||
double kp;
|
||||
double ki;
|
||||
double kd;
|
||||
} pidcont_t;
|
||||
|
||||
|
||||
void pidcont_init(pidcont_t* p);
|
||||
void pidcont_setup(pidcont_t* p, double kp, double ki, double kd);
|
||||
double pidcont_apply(pidcont_t* p, double target, double actual, double dt);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user