WANG YUCHAO
/
spine_2020_9_8
mit
Diff: main.cpp
- Revision:
- 8:10162f709930
- Parent:
- 7:f10513577d4c
--- a/main.cpp Sun Jul 15 21:55:27 2018 +0000 +++ b/main.cpp Wed Jul 18 18:49:46 2018 +0000 @@ -380,9 +380,11 @@ } - + +int print_counter = 0; void control() { + print_counter ++; if(((spi_command.flags[0]&0x1)==1) && (enabled==0)){ enabled = 1; @@ -501,9 +503,15 @@ //PackAll(); //WriteAll(); } + spi_data.checksum = xor_checksum((uint32_t*)&spi_data,14); for(int i = 0; i < DATA_LEN; i++){ tx_buff[i] = ((uint16_t*)(&spi_data))[i];} + + if(print_counter>100){ + print_counter = 0; + printf("%3f %3f %3f\n\r", l2_control.a.t_ff, l2_control.h.t_ff, l2_control.k.t_ff); + } }