X-Git-Url: https://rtime.felk.cvut.cz/gitweb/fpga/rpi-motor-control.git/blobdiff_plain/9650ac29cdffe74d39e64da32a34384dcd9db72f..8785f652c92188d72cc75512567ceae80b3e611d:/pmsm-control/test_sw/pmsm_state.h diff --git a/pmsm-control/test_sw/pmsm_state.h b/pmsm-control/test_sw/pmsm_state.h index e028201..8c80265 100644 --- a/pmsm-control/test_sw/pmsm_state.h +++ b/pmsm-control/test_sw/pmsm_state.h @@ -4,6 +4,8 @@ #include #include +#define OLD_POS_NUM 50 + struct rpi_in; struct rpi_state{ @@ -20,8 +22,9 @@ 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 */