Commit 6840c109 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

The loop functions return 0xFF to indicate the packet has to be relayed (not...

The loop functions return 0xFF to indicate the packet has to be relayed (not processed or broadcast ID)
parent 042183c3
......@@ -98,6 +98,8 @@ unsigned char dyn_v1_slave_loop(TDynamixelSlaveDevice *device,unsigned char *rx_
(*error)=DYN_INST_ERROR;
}
}
else if(id==DYN_BROADCAST_ID)
send_status=0xFF;
break;
case DYN_WRITE: (*length)=dyn_get_write_data(rx_buffer,data);
(*error)=device->on_write(dyn_get_write_address(rx_buffer),*length,data);
......@@ -108,6 +110,8 @@ unsigned char dyn_v1_slave_loop(TDynamixelSlaveDevice *device,unsigned char *rx_
if((*error)!=DYN_NO_ERROR)
(*error)=DYN_INST_ERROR;
}
else if(id==DYN_BROADCAST_ID)
send_status=0xFF;
break;
case DYN_REG_WRITE: device->reg_length=dyn_get_reg_write_data(rx_buffer,device->reg_buffer);
device->reg_address=dyn_get_reg_write_address(rx_buffer);
......@@ -199,6 +203,8 @@ unsigned char dyn_v1_slave_loop(TDynamixelSlaveDevice *device,unsigned char *rx_
}
}
}
else
send_status=0xFF;
}
}
......@@ -242,6 +248,8 @@ unsigned char dyn_v2_slave_loop(TDynamixelSlaveDevice *device,unsigned char *rx_
(*error)=DYN_INST_ERROR;
}
}
else if(id==DYN_BROADCAST_ID)
send_status=0xFF;
break;
case DYN_WRITE: (*length)=dyn2_get_write_data(rx_buffer,data);
(*error)=device->on_write(dyn2_get_write_address(rx_buffer),*length,data);
......@@ -252,6 +260,8 @@ unsigned char dyn_v2_slave_loop(TDynamixelSlaveDevice *device,unsigned char *rx_
if((*error)!=DYN_NO_ERROR)
(*error)=DYN_INST_ERROR;
}
else if(id==DYN_BROADCAST_ID)
send_status=0xFF;
break;
case DYN_REG_WRITE: device->reg_length=dyn2_get_reg_write_data(rx_buffer,device->reg_buffer);
device->reg_address=dyn2_get_reg_write_address(rx_buffer);
......@@ -376,6 +386,8 @@ unsigned char dyn_v2_slave_loop(TDynamixelSlaveDevice *device,unsigned char *rx_
}
}
}
else
send_status=0xFF;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment