Skip to content

Commit a67c5fc

Browse files
author
Kei
committed
Added exception handling code for sync/bulk.
1 parent 3479924 commit a67c5fc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utility/master.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,7 @@ Master::syncRead(InfoSyncReadInst_t* p_info, uint32_t timeout_ms)
634634
}
635635
}
636636
}else if(p_info->packet.p_buf == nullptr && info_tx_packet_.inst_idx != DXL_INST_SYNC_READ){
637+
p_info->packet.is_completed = false;
637638
err = DXL_LIB_ERROR_NOT_INITIALIZED;
638639
}
639640

@@ -730,6 +731,7 @@ Master::syncWrite(InfoSyncWriteInst_t* p_info)
730731
}
731732
}
732733
}else if(p_info->packet.p_buf == nullptr && info_tx_packet_.inst_idx != DXL_INST_SYNC_WRITE){
734+
p_info->packet.is_completed = false;
733735
err = DXL_LIB_ERROR_NOT_INITIALIZED;
734736
}
735737

@@ -812,6 +814,7 @@ Master::bulkRead(InfoBulkReadInst_t* p_info, uint32_t timeout_ms)
812814
}
813815
}
814816
}else if(p_info->packet.p_buf == nullptr && info_tx_packet_.inst_idx != DXL_INST_BULK_READ){
817+
p_info->packet.is_completed = false;
815818
err = DXL_LIB_ERROR_NOT_INITIALIZED;
816819
}
817820

@@ -900,6 +903,7 @@ Master::bulkWrite(InfoBulkWriteInst_t* p_info)
900903
}
901904
}
902905
}else if(p_info->packet.p_buf == nullptr && info_tx_packet_.inst_idx != DXL_INST_BULK_WRITE){
906+
p_info->packet.is_completed = false;
903907
err = DXL_LIB_ERROR_NOT_INITIALIZED;
904908
}
905909

0 commit comments

Comments
 (0)