File tree 2 files changed +13
-7
lines changed
libraries/Insights/examples
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ static void smoke_test()
36
36
if (s_reset_count > MAX_CRASHES) {
37
37
ESP_DIAG_EVENT (TAG, " [count][%d]" , count);
38
38
} else {
39
- log_e (" [count][%d] [crash_count][%" PRIu32" ] [excvaddr][0x0f] Crashing..." , count, s_reset_count);
39
+ log_e (" [count][%d] [crash_count][%" PRIu32 " ] [excvaddr][0x0f] Crashing..." , count, s_reset_count);
40
40
*(int *)0x0F = 0x10 ;
41
41
}
42
42
}
@@ -51,7 +51,7 @@ static void smoke_test()
51
51
void *p = malloc (size);
52
52
if (p) {
53
53
memset (p, size, ' A' + (esp_random () % 26 ));
54
- log_i (" Allocated %" PRIu32" bytes" , size);
54
+ log_i (" Allocated %" PRIu32 " bytes" , size);
55
55
}
56
56
s_ptrs[count % MAX_PTRS] = p;
57
57
} else {
@@ -70,10 +70,13 @@ void setup()
70
70
Serial.begin (115200 );
71
71
WiFi.mode (WIFI_STA);
72
72
WiFi.begin (WIFI_SSID, WIFI_PASSPHRASE);
73
- if (!WiFi.isConnected ()) {
74
- delay (2000 );
73
+ while (WiFi.status () != WL_CONNECTED) {
74
+ delay (500 );
75
+ Serial.print (" ." );
75
76
}
76
-
77
+ Serial.println (" " );
78
+ Serial.println (" WiFi connected" );
79
+
77
80
esp_err_t ret = Insights.init (insights_auth_key, ESP_DIAG_LOG_TYPE_ERROR | ESP_DIAG_LOG_TYPE_WARNING | ESP_DIAG_LOG_TYPE_EVENT);
78
81
if (ret != ESP_OK) {
79
82
ESP.restart ();
Original file line number Diff line number Diff line change @@ -12,9 +12,12 @@ void setup()
12
12
Serial.begin (115200 );
13
13
WiFi.mode (WIFI_STA);
14
14
WiFi.begin (WIFI_SSID, WIFI_PASSPHRASE);
15
- if (!WiFi.isConnected ()) {
16
- delay (2000 );
15
+ while (WiFi.status () != WL_CONNECTED) {
16
+ delay (500 );
17
+ Serial.print (" ." );
17
18
}
19
+ Serial.println (" " );
20
+ Serial.println (" WiFi connected" );
18
21
esp_err_t ret = Insights.init (insights_auth_key, ESP_DIAG_LOG_TYPE_ERROR | ESP_DIAG_LOG_TYPE_WARNING | ESP_DIAG_LOG_TYPE_EVENT);
19
22
if (ret != ESP_OK) {
20
23
ESP.restart ();
You can’t perform that action at this time.
0 commit comments