]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blob - pmsm-control/test_sw/comp.h
Setters made inline.
[fpga/rpi-motor-control.git] / pmsm-control / test_sw / comp.h
1 /**
2  * \brief
3  * Computatations of position, index, speed.
4  *
5  */
6 #ifndef COMP
7 #define COMP
8
9 struct rpi_in;
10 struct rpi_state;
11
12 /**
13  * \brief
14  * Substact initial position.
15  */
16 void substractOffset(struct rpi_in* data, struct rpi_in* offset);
17
18 /**
19  * \brief
20  * Computation of distance to index.
21  *
22  * K dispozici je 12-bit index, to umoznuje ulozit 4096 ruznych bodu
23  * Je nutne vyjadrit 1999 bodu proti i posmeru h.r. od indexu -
24  *      to je 3999 bodu
25  *      =>12 bitu je dostacujicich, pokud nikdy nedojde ke ztrate
26  *              signalu indexu
27  */
28 void comIndDist(struct rpi_state*);
29
30 /*
31  * \brief
32  * Computates speed.
33  */
34 void compSpeed(struct rpi_state*);
35
36 #endif /*COMP*/
37