Skip to content
Snippets Groups Projects
Commit 4a92dc85 authored by esc2's avatar esc2
Browse files

Update Distinguish.c

parent 6829b7b2
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,8 @@ void Distinguish(uint8_t *data){ ...@@ -59,7 +59,8 @@ void Distinguish(uint8_t *data){
else if(message_type == 0x80){ //messagetpye = motor else if(message_type == 0x80){ //messagetpye = motor
int32_t forwardback=0; int32_t forwardback=0;
int32_t leftright = 0; int32_t leftright = 0;
for(int i=0; i<4; i++){ //loop places data bytes into right int i = 0;
for(i=0; i<4; i++){ //loop places data bytes into right
forwardback += *(data+4+i); //spot forwardback += *(data+4+i); //spot
leftright += *(data+8+i); leftright += *(data+8+i);
if(i!=3){ if(i!=3){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment