Skip to content
Snippets Groups Projects
Commit 876d0bbc authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Completelly erase the buffer once it has been processed.

parent 799a5adf
No related branches found
No related tags found
No related merge requests found
......@@ -106,8 +106,8 @@ unsigned char dyn_slave_check_new_packet(TDynamixelSlave *slave)
void dyn_slave_loop(TDynamixelSlave *slave)
{
unsigned char i,send_status=0xFF,error,data[MAX_DYN_SLAVE_TX_BUFFER_LEN];
unsigned short int length;
unsigned char send_status=0xFF,error,data[MAX_DYN_SLAVE_TX_BUFFER_LEN];
unsigned short int length,i;
unsigned char *buffer;
if(slave!=0x00000000)
......@@ -155,7 +155,7 @@ void dyn_slave_loop(TDynamixelSlave *slave)
dyn_slave_send_cb(slave);
}
// erase header of the current buffer
for(i=0;i<4;i++)
for(i=0;i<MAX_DYN_SLAVE_RX_BUFFER_LEN;i++)
buffer[i]=0x00;
}
else
......
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