Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-cloud-connect-example-ethernet by
Diff: main.cpp
- Revision:
- 6:254a7e7fbef1
- Parent:
- 5:c18fab181ede
- Child:
- 8:ace9e5de6491
--- a/main.cpp Wed Feb 14 17:26:42 2018 -0600
+++ b/main.cpp Thu Feb 15 10:14:35 2018 -0600
@@ -111,9 +111,6 @@
printf("IP address %s\n", ip_addr);
}
- // Placeholder for callback to update local resource when GET comes.
- timer.attach(&button_press, 5.0);
-
SimpleMbedCloudClient mbedClient(&net);
// Save pointer to mbedClient so that other functions can access it.
client = &mbedClient;
@@ -144,6 +141,14 @@
mbedClient.register_and_connect();
+ // Wait for client to finish registering
+ while (!mbedClient.is_client_registered()) {
+ wait_ms(100);
+ }
+
+ // Placeholder for callback to update local resource when GET comes.
+ timer.attach(&button_press, 5.0);
+
// Check if client is registering or registered, if true sleep and repeat.
while (mbedClient.is_register_called()) {
static int button_count = 0;
