mainloop/* moved to root

This commit is contained in:
2022-09-27 20:01:14 +02:00
parent 8e211fd8fb
commit 5dd7f4a277
40 changed files with 895 additions and 35 deletions

25
pidcont.h Normal file
View 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