zlac: doc 0x606C du phong boc try rieng -- khong terminate khi bus CAN nghen
This commit is contained in:
@@ -273,13 +273,22 @@ void ZlacMotorDriver::telemetryLoop() {
|
||||
pdo_mapped_ = true;
|
||||
} catch (...) {
|
||||
// Fallback to SDO synchronous read if PDO is not mapped yet
|
||||
auto left_opt = sdo_read_sync<int32_t>(*master_, node_id_, 0x606C, 1);
|
||||
auto right_opt = sdo_read_sync<int32_t>(*master_, node_id_, 0x606C, 2);
|
||||
//
|
||||
// [vslam] try rieng, nhu 0x6064 ben duoi: nem tu trong catch ->
|
||||
// std::terminate. Da xay ra GIUA phien chay 2026-09-28 khi bus CAN
|
||||
// nghen ("49 write errors"): SdoError("SubmitRead:01:606C:01:
|
||||
// Resource not available: SDO connection") va node abort.
|
||||
try {
|
||||
auto left_opt = sdo_read_sync<int32_t>(*master_, node_id_, 0x606C, 1);
|
||||
auto right_opt = sdo_read_sync<int32_t>(*master_, node_id_, 0x606C, 2);
|
||||
|
||||
if (left_opt.has_value() && right_opt.has_value()) {
|
||||
cached_left_vel_raw_ = left_opt.value();
|
||||
cached_right_vel_raw_ = right_opt.value();
|
||||
cached_vel_valid_ = true;
|
||||
if (left_opt.has_value() && right_opt.has_value()) {
|
||||
cached_left_vel_raw_ = left_opt.value();
|
||||
cached_right_vel_raw_ = right_opt.value();
|
||||
cached_vel_valid_ = true;
|
||||
}
|
||||
} catch (...) {
|
||||
// Mat mot mau van toc; 20 ms sau doc lai.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user