if( 0==AlmmgrGetManagement(&data))
{
-
-
for(int i=0;i<EVENT_ALARM_CLOCK_MAX;i++)
{
if(data.eventAlarmInfo[i].alarmClockId==i && data.eventAlarmInfo[i].alarmType==TYPE_EVENT_ALARM_CLOCK)
{
//*file_size=ent->d_reclen;
- char file_path[256]={0};
+ char file_path[300]={0};
sprintf_s(file_path,256,"%s/%s",TAR_PATH,ent->d_name);
FILE * fp = fopen(file_path,"rb+");
}
fclose(fp);
-
+ // "exc_V1.3.102_20241220_110921_1734693197.tar"
+
memcpy(file_name,file_path,strlen(file_path));
uint8_t crc= Calculate_CRC_file(file_name);
char *json_format = cJSON_PrintUnformatted(itemJSON);
int pSize = cJSON_GetArraySize(dataJSON);
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"文件数据:%s\r\n",json_format);
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"文件数据:%s\r\n",json_format);
cJSON_Delete(dataJSON);
file_index++;
}
else
{
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"opendir fail\r\n");
+
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"opendir fail\r\n");
}
+ cJSON_Delete(dataJSON);
+ cJSON_Delete(data_arryJSON);
+
return NULL;
}
\r
if(fp==NULL)\r
{\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"fopen fail %s\r\n",file_path);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"fopen fail %s\r\n",file_path);\r
+ return 0;\r
}\r
do\r
{\r
{\r
ble_data_type type_={0x05,id,file_size,pack,pack_id};\r
send_big_data(type_,(char *)data,read_size);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"Read_tar_file_buf_send_Data size %d\r\n",read_size);\r
}\r
\r
\r
{\r
\r
char *send_buf=NULL;\r
- WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP,"read_dir_send_json xxxxxxxx\r\n");\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"read_dir_send_json xxxxxxxx\r\n");\r
+ memset_s(file_name,128,0,128);\r
send_buf=tar_dir_to_json_buf_malloc_(file_name,&file_size);\r
+ WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"read_dir_send_json end\r\n");\r
if( send_buf!=NULL)\r
{\r
//send_big_data(1,send_buf,strlen(send_buf),strlen(send_buf),1,1,0x26,0x04);\r
+\r
ble_data_type type_={0x04,0x26,strlen(send_buf),1,1};\r
\r
send_big_data(type_,(char *)send_buf,strlen(send_buf));\r