void dxl_txrx_packet() { dxl_tx_packet(); if( gbCommStatus != COMM_TXSUCCESS ) return; do{ dxl_rx_packet(); }while( gbCommStatus == COMM_RXWAITING ); }
// send instruction packet ans wait for reply void dxl_txrx_packet() { // send instruction packet dxl_tx_packet(); // send was not successful, return error if( gbCommStatus != COMM_TXSUCCESS ) return; // wait for reply within the timeout period do{ dxl_rx_packet(); }while( gbCommStatus == COMM_RXWAITING ); }
void dxl_txrx_packet() { dxl_tx_packet(); if( gbCommStatus != COMM_TXSUCCESS ) return; do{ dxl_rx_packet(); }while( gbCommStatus == COMM_RXWAITING ); #ifdef DEBUG_PRINT printf("RX (%d %d):", gbRxGetLength, gbCommStatus); for (int i=0; i < gbRxGetLength; i++) { printf(" %2x", gbStatusPacket[i]); if ((i & 0xf) == 0xf) printf("\n"); } printf("\n"); #endif }
void Dynamixel::rxPacket(void){ dxl_rx_packet(); }