Minor changes to status monitor.
authorMartin Prudek <prudemar@fel.cvut.cz>
Thu, 14 May 2015 19:55:40 +0000 (21:55 +0200)
committerMartin Prudek <prudemar@fel.cvut.cz>
Thu, 14 May 2015 19:55:40 +0000 (21:55 +0200)
pmsm-control/test_sw/cmd_proc.c

index 70304d6..da882c0 100644 (file)
@@ -118,13 +118,11 @@ void printData(struct rpi_state* state){
        printf("raw_pozice=%u\n",data_p.pozice_raw);
        printf("raw_pozice last12=%u\n",(data_p.pozice_raw&0x0FFF));
        printf("index position=%u\n",data_p.index_position);
+       printf("distance to index=%u\n",s.index_dist);
        printf("hal1=%d, hal2=%d, hal3=%d\n",data_p.hal1,data_p.hal2,data_p.hal3);
        printf("en1=%d, en2=%d, en3=%d (Last sent)\n",!!(0x40&s.test),!!(0x20&s.test),!!(0x10&s.test));
        printf("shdn1=%d, shdn2=%d, shdn3=%d (L.s.)\n",!!(0x08&s.test),!!(0x04&s.test),!!(0x02&s.test));
-       printf("PWM1=%u(L.s.)\n",s.pwm1);
-       printf("PWM2=%u(L.s.)\n",s.pwm2);
-       printf("PWM3=%u(L.s.)\n",s.pwm3);
-       printf("distance to index=%u\n",s.index_dist);
+       printf("  PWM1=%u   PWM2=%u   PWM3=%u\n",s.pwm1,s.pwm2,s.pwm3);
        printf("T_PWM1=%u T_PWM2=%u T_PWM3=%u\n",s.t_pwm1,s.t_pwm2, s.t_pwm3);
        printf("Pocet namerenych proudu=%u\n",data_p.adc_m_count);
        printf("(pwm1) (ch1)=%d (avg=%4.0f) (%2.2f%%)\n",data_p.ch1,cur1,diff_p(cur1));