#include <stdint.h>
#include <semaphore.h>
+#define OLD_POS_NUM 50
+
struct rpi_in;
struct rpi_state{
int duty; /* duty cycle of pwm */
int desired_pos; /* desired position */
- int old_pos; /* one cycle old position */
+ int old_pos[OLD_POS_NUM]; /* old positions */
int desired_spd; /* desired speed */
+ int speed;
char commutate; /* zapina prepocet duty na jednotlive pwm */
char pos_reg_ena; /* position regulation enable */