Commit a9d72472 authored by DESKTOP-MC5UL36\dell's avatar DESKTOP-MC5UL36\dell

hardware_iic读取失败会导致不上线,python文件下载的bug

parent dcbd8165
...@@ -77,11 +77,9 @@ int hardware_iic_write(uint8_t device_addr, uint8_t reg_addr, const uint8_t *dat ...@@ -77,11 +77,9 @@ int hardware_iic_write(uint8_t device_addr, uint8_t reg_addr, const uint8_t *dat
my_zlog_warn("错误:向设备 0x%02X 寄存器 0x%02X 写入数据失败。", device_addr, reg_addr); my_zlog_warn("错误:向设备 0x%02X 寄存器 0x%02X 写入数据失败。", device_addr, reg_addr);
break; break;
} }
pthread_mutex_unlock(&i2c_mutex);
ret = 0; // 成功 ret = 0; // 成功
}while(0); }while(0);
pthread_mutex_unlock(&i2c_mutex);
// my_zlog_info("成功向设备 0x%02X 寄存器 0x%02X 写入 %d 字节数据。", device_addr, reg_addr, len); // my_zlog_info("成功向设备 0x%02X 寄存器 0x%02X 写入 %d 字节数据。", device_addr, reg_addr, len);
return ret; return ret;
} }
......
...@@ -290,10 +290,9 @@ int go_deploy_check_and_update(void) { ...@@ -290,10 +290,9 @@ int go_deploy_check_and_update(void) {
if (access(target_file_path, F_OK) == 0) { if (access(target_file_path, F_OK) == 0) {
chmod(target_file_path, 0777); chmod(target_file_path, 0777);
} }
}
// ---------------------------------------------------------
// 处理 video_proxy.7z // 处理 video_proxy.7z
// ---------------------------------------------------------
cJSON *pythonUrl = cJSON_GetObjectItem(moreInfo, "pythonUrl"); cJSON *pythonUrl = cJSON_GetObjectItem(moreInfo, "pythonUrl");
if (pythonUrl && cJSON_IsString(pythonUrl) && strlen(pythonUrl->valuestring) > 0) { if (pythonUrl && cJSON_IsString(pythonUrl) && strlen(pythonUrl->valuestring) > 0) {
char target_7z_path[512]; char target_7z_path[512];
...@@ -302,6 +301,7 @@ int go_deploy_check_and_update(void) { ...@@ -302,6 +301,7 @@ int go_deploy_check_and_update(void) {
int need_download_7z = 0; int need_download_7z = 0;
// 检查文件是否存在 // 检查文件是否存在
my_zlog_info("target_7z_path:%s",target_7z_path);
if (access(target_7z_path, F_OK) != 0) { if (access(target_7z_path, F_OK) != 0) {
my_zlog_info("video_proxy.7z not found, need download."); my_zlog_info("video_proxy.7z not found, need download.");
need_download_7z = 1; need_download_7z = 1;
...@@ -363,7 +363,6 @@ int go_deploy_check_and_update(void) { ...@@ -363,7 +363,6 @@ int go_deploy_check_and_update(void) {
} }
} }
} }
}
cJSON_Delete(root); cJSON_Delete(root);
ret = 0; ret = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment