这个代码改成我这个,就能解决卡屏问题
- /**
- * @brief HTTP解析请求数据
- *
- * @param https_request_data
- * @return char*
- */
- static char* https_get_data(const char* https_request_data)
- {
- char* request_data = https_request_data;
- static char* https_data;
- https_data = pvPortMalloc(1024*4);
- memset(https_data, 0, 1024*2);
- char* date = pvPortMalloc(64);
- char* request_value = strtok(request_data, "\n");
- for (size_t i = 0; i < 8; i++)
- {
- printf("%s\r\n", request_value);
- if (i==2) strcpy(date, request_value);
- request_value = strtok(NULL, "\n");
- }
- get_https_date(date);
- if (request_value != NULL) {
- strcpy(https_data, request_value);
- }
- vPortFree(date);
- return https_data;
- }
复制代码
一直显示周五的问题
- typedef struct {
- char city[16];
- char date[12];
- char week[10];
- char wea[24];
- char wea_img[8];
- char tem[4];
- char tem_day[4];
- char tem_night[4];
- char win[24];
- char win_speed[24];
- char win_meter[12];
- char air[4];
- char pressure[8];
- char humidity[8];
- } dayweather_t;
复制代码
这个代码质量有点差,但是页面和外壳还不错 |