diff --git a/.vscode/settings.json b/.vscode/settings.json index a2c40cd..523e4de 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,7 +8,6 @@ "vector": "cpp", "string_view": "cpp", "initializer_list": "cpp", - "cmath": "cpp", - "*.tcc": "cpp" + "cmath": "cpp" } } \ No newline at end of file diff --git a/lib/groundlight/src/groundlight.cpp b/lib/groundlight/src/groundlight.cpp index 3d3e3c7..b13fa70 100644 --- a/lib/groundlight/src/groundlight.cpp +++ b/lib/groundlight/src/groundlight.cpp @@ -378,7 +378,7 @@ detector_list get_detector_list(const char *endpoint, const char *apiToken) { strcpy(_detector_list[i].type, detectors[i]["type"]); strcpy(_detector_list[i].created_at, detectors[i]["created_at"]); strcpy(_detector_list[i].name, detectors[i]["name"]); - strcpy(_detector_list[i].query, detectors[i]["query"]); + strlcpy(_detector_list[i].query, detectors[i]["query"],sizeof(_detector_list[i].query)); strcpy(_detector_list[i].group_name, detectors[i]["group_name"]); if (!detectors[i]["metadata"].isNull()) { String metadataStr; diff --git a/src/deployable_example.cpp b/src/deployable_example.cpp index 485d44e..7dc8d7b 100644 --- a/src/deployable_example.cpp +++ b/src/deployable_example.cpp @@ -838,7 +838,6 @@ void loop () { } if (WiFi.isConnected()) { debug_printf("WIFI connected to SSID %s\n", ssid); - } else { debug_printf("unable to connect to wifi status code %d! (skipping image query and looping again)\n", WiFi.status()); @@ -1232,8 +1231,10 @@ bool notifyStacklight(const char * label) { stacklightState = STACKLIGHT_ONLINE; String SSID = ((const StringSumHelper)"GL_STACKLIGHT_" + preferences.getString("sl_uuid", "")); WiFi.begin(SSID, (const StringSumHelper)"gl_stacklight_password_" + preferences.getString("sl_uuid", "")); + Serial.println("wifi begins"); for (int i = 0; i < 40 && WiFi.status() != WL_CONNECTED; i++) { vTaskDelay(500 / portTICK_PERIOD_MS); + Serial.println("debug"); } if(WiFi.isConnected()) { String res = Stacklight::tryConnectToStacklight(ssid, password);