mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-14 05:58:13 +08:00
fix:json数据返回错误
add:掉电储存数据 add:优化初始化逻辑
This commit is contained in:
@@ -212,11 +212,11 @@ void user_function_cmd_received( int udp_flag, uint8_t *pusrdata )
|
||||
cJSON_Delete( json_send );
|
||||
}
|
||||
|
||||
// if ( update_user_config_flag )
|
||||
// {
|
||||
// mico_system_context_update( sys_config );
|
||||
// update_user_config_flag = false;
|
||||
// }
|
||||
if ( update_user_config_flag )
|
||||
{
|
||||
mico_system_context_update( sys_config );
|
||||
update_user_config_flag = false;
|
||||
}
|
||||
|
||||
cJSON_Delete( pJsonRoot );
|
||||
return;
|
||||
@@ -303,6 +303,8 @@ bool json_plug_analysis( int udp_flag, char x, cJSON * pJsonRoot, cJSON * pJsonS
|
||||
if ( json_plug_task_analysis( x, i, p_plug_setting, json_plug_setting_send ) )
|
||||
return_flag = true;
|
||||
}
|
||||
|
||||
cJSON_AddItemToObject( json_plug_send, "setting", json_plug_setting_send );
|
||||
}
|
||||
|
||||
cJSON_AddItemToObject( pJsonSend, plug_str, json_plug_send );
|
||||
|
||||
Reference in New Issue
Block a user