- printf("\npozice=%d\n",(int32_t)data.pozice);
- printf("raw_pozice=%d\n",(int32_t)data.pozice_raw);
- printf("raw_pozice last11=%u\n",(data.pozice_raw&0x7FF));
- printf("index position=%d\n",(int16_t)data.index_position);
- printf("hal1=%d, hal2=%d, hal3=%d\n",data.hal1,data.hal2,data.hal3);
- printf("en1=%d, en2=%d, en3=%d (Last sent)\n",!!(0x40&test),!!(0x20&test),!!(0x10&test));
- printf("shdn1=%d, shdn2=%d, shdn3=%d (L.s.)\n",!!(0x08&test),!!(0x04&test),!!(0x02&test));
- printf("PWM1=%u(L.s.)\n",pwm1);
- printf("PWM2=%u(L.s.)\n",pwm2);
- printf("PWM3=%u(L.s.)\n",pwm3);
- printf("Pocet namerenych proudu=%u\n",data.adc_m_count);
- printf("(pwm1) (ch1)=%d (avg=%4.0f) (%2.2f%%)\n",data.ch1,cur1,diff_p(cur1));
- printf("(pwm2) (ch2)=%d (avg=%4.0f)(%2.2f%%)\n",data.ch2,cur2,diff_p(cur2));
- printf("(pwm3) (ch0)=%d (avg=%4.0f)(%2.2f%%)\n",data.ch0,cur0,diff_p(cur0));
+ printf("\npozice=%d\n",(int32_t)data_p.pozice);
+ printf("transfer count=%u\n",s.tf_count);
+ printf("raw_pozice=%d\n",(int32_t)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("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));
+ printf("(pwm2) (ch2)=%d (avg=%4.0f)(%2.2f%%)\n",data_p.ch2,cur2,diff_p(cur2));
+ printf("(pwm3) (ch0)=%d (avg=%4.0f)(%2.2f%%)\n",data_p.ch0,cur0,diff_p(cur0));