各类信息只显示一次,错误不显示

This commit is contained in:
wantong
2024-01-31 15:52:34 +08:00
parent c5b2a4e98b
commit 1a6dcfe14e
18 changed files with 4822 additions and 4764 deletions

View File

@ -3,8 +3,10 @@
#include "cJSON_Test.h"
#include "string.h"
#include "Store_Information.h"
#include "stdlib.h"
#include "stdbool.h"
struct paramstruct Parameters; //声明结构体对象
extern bool Printf_Flag ;
void cjson(uint8_t g_usart_json_string[])
{
const char * json_string = g_usart_json_string;
@ -43,12 +45,14 @@ void cjson(uint8_t g_usart_json_string[])
// 释放 cJSON 对象
Printf_Flag= true;
// 释放 cJSON 对象
cJSON_Delete(json);
} else {
// 处理解析错误
printf("JSON parsing error.\n");
printf("JSON parsing error JSON parsing error JSON parsing error JSON parsing error.\n");
Printf_Flag = false;
}
}