From db839a9ccd178c530597c3b832a84f1f6004f667 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Mon, 31 Aug 2020 16:56:54 -0400 Subject: [PATCH] Add new status field: is_i2c_locked to help with the new config page --- components/wifi-manager/wifi_manager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/wifi-manager/wifi_manager.c b/components/wifi-manager/wifi_manager.c index 829a968f..9852113b 100644 --- a/components/wifi-manager/wifi_manager.c +++ b/components/wifi-manager/wifi_manager.c @@ -462,7 +462,11 @@ cJSON * wifi_manager_get_basic_info(cJSON **old){ cJSON_AddNumberToObject(root,"Voltage", battery_value_svc()); cJSON_AddNumberToObject(root,"disconnect_count", num_disconnect ); cJSON_AddNumberToObject(root,"avg_conn_time", num_disconnect>0?(total_connected_time/num_disconnect):0 ); - +#if CONFIG_I2C_LOCKED + cJSON_AddTrueToObject(root, "is_i2c_locked"); +#else + cJSON_AddFalseToObject(root, "is_i2c_locked"); +#endif ESP_LOGV(TAG, "wifi_manager_get_basic_info done"); return root; }