update ErrorCode, status, lifecycle
This commit is contained in:
@@ -6,9 +6,10 @@
|
||||
static void run_lidar(const char* tag, const lidarlib::ModelConfig& cfg,
|
||||
const std::string& local_ip, uint16_t port, bool inverted, int n_scans) {
|
||||
lidarlib::Driver drv(cfg, local_ip, port, inverted);
|
||||
if (!drv.open()) {
|
||||
fprintf(stderr, "[%s] Khong mo duoc socket tren %s:%u (interface khong ton tai?)\n",
|
||||
tag, local_ip.c_str(), port);
|
||||
lidarlib::ErrorCode err = drv.open();
|
||||
if (err != lidarlib::ErrorCode::Ok) {
|
||||
fprintf(stderr, "[%s] Khong mo duoc socket tren %s:%u (%s)\n",
|
||||
tag, local_ip.c_str(), port, lidarlib::to_string(err));
|
||||
return;
|
||||
}
|
||||
printf("[%s] Da bind %s:%u, dang doi scan...\n", tag, local_ip.c_str(), port);
|
||||
|
||||
Reference in New Issue
Block a user