Cosmetic changes.
authorMartin Prudek <prudemar@fel.cvut.cz>
Wed, 20 May 2015 19:45:27 +0000 (21:45 +0200)
committerMartin Prudek <prudemar@fel.cvut.cz>
Wed, 20 May 2015 19:45:27 +0000 (21:45 +0200)
pmsm-control/test_sw/main_pmsm.c

index f0fc982..6f3c670 100644 (file)
@@ -62,15 +62,14 @@ struct rpi_state rps={
        .doLogs=0,
        .alpha_offset=960,
        .main_commutator=zero_commutator,       /* komutace vypnuta */
-       .main_controller=zero_controller        /* rizeni vypnuto */
+       .main_controller=zero_controller        /*rizeni vypnuto */
 };
 
 
 /**
  * \brief Initilizes GPCLK.
  */
-int clk_init()
-{
+int clk_init(){
        initialise(); /*namapovani gpio*/
        initClock(PLLD_500_MHZ, 10, 0);
        gpioSetMode(4, FSEL_ALT0);
@@ -112,7 +111,6 @@ void * pos_monitor(void* param){
 /*
  * \brief
  * Feedback loop.
- * TODO: replace bunch of 'IFs' with Object-like pattern
  */
 void * control_loop(void* param){
        int i;
@@ -128,8 +126,6 @@ void * control_loop(void* param){
        uint16_t last_index;                            /*we have index up-to date*/
        spi_read(&poc);         /*pocatecni informace*/
        clock_gettime(CLOCK_MONOTONIC ,&t);
-       /* start after one second */
-       t.tv_sec++;
                while(1){
                        /* wait until next shot */
                        clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &t, NULL);