update
This commit is contained in:
@@ -243,15 +243,38 @@ class ZlacBase : public BaseInterface {
|
||||
// lely cho thay 1018:01 CUNG abort, tuc SDO hong tu goc. Chan doan sai huong
|
||||
// ton nhieu thoi gian hon la mot thong bao chung chung.
|
||||
StatusResponse ProbeIdentity() {
|
||||
// Thu NHIEU object, khong chi 0x1018.
|
||||
//
|
||||
// ⚠️ Ban dau cho nay chi doc 0x1018:01 voi lap luan "DS301 bat buoc no,
|
||||
// nen no im tuc la SDO hong". Lap luan do SAI voi thiet bi nay: base_kit
|
||||
// chay duoc tren cung con driver ma KHONG BAO GIO doc 0x1018 -- no chi
|
||||
// dung 0x6060, 0x6040, 0x606C. Driver gia re thuong bo trong Identity
|
||||
// Object.
|
||||
//
|
||||
// Nen: SDO duoc coi la thong neu BAT KY object nao tra loi. 0x606C la
|
||||
// object base_kit doc thanh cong moi 20 ms, tuc no chac chan co.
|
||||
if (SdoRead<uint32_t>(*master_, cfg_.can_node_id, 0x1018, 1)) {
|
||||
return StatusResponse::Ok();
|
||||
}
|
||||
VSLAM_WARN("base: node " << static_cast<int>(cfg_.can_node_id)
|
||||
<< " khong tra loi 0x1018:01 (Identity). Thu 0x606C...");
|
||||
if (SdoRead<int32_t>(*master_, cfg_.can_node_id, 0x606C, 1)) {
|
||||
VSLAM_WARN("base: 0x606C tra loi -- SDO thong, thiet bi chi thieu "
|
||||
"Identity Object. Di tiep.");
|
||||
return StatusResponse::Ok();
|
||||
}
|
||||
if (SdoRead<int8_t>(*master_, cfg_.can_node_id, 0x6060, 0)) {
|
||||
VSLAM_WARN("base: 0x6060 tra loi -- SDO thong. Di tiep.");
|
||||
return StatusResponse::Ok();
|
||||
}
|
||||
return StatusResponse::Error(
|
||||
StatusCode::kUnavailable,
|
||||
"base: node " + std::to_string(cfg_.can_node_id) +
|
||||
" khong tra loi 0x1018:01 (Vendor-ID). Day la object BAT BUOC cua "
|
||||
"moi thiet bi CANopen, nen day la loi CAN/SDO chu khong phai "
|
||||
"chuyen thiet bi thieu object. Kiem theo thu tu:\n"
|
||||
" khong tra loi BAT KY object nao trong ba thu: 0x1018:01 "
|
||||
"(Identity), 0x606C:1 (velocity actual), 0x6060:0 (mode). "
|
||||
"base_kit doc duoc hai cai sau moi 20 ms tren cung con driver, "
|
||||
"nen neu ca ba deu im thi van de o duong truyen chu khong o thiet "
|
||||
"bi. Kiem theo thu tu:\n"
|
||||
" 1. Co tien trinh khac dang giu bus khong? base_kit co "
|
||||
"zlac_ros.service va motor_control.service -- hai CANopen master "
|
||||
"tren cung mot bus cho ra dung trieu chung nay.\n"
|
||||
|
||||
Reference in New Issue
Block a user