Skip to content

Commit 0240489

Browse files
author
Teemu Kultala
committed
Intermediate print change
1 parent 53d9df9 commit 0240489

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

main.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ void print_function(const char *input_string)
6060
{
6161
PrintMutex.lock();
6262
printf("%s", input_string);
63+
fflush(NULL);
6364
PrintMutex.unlock();
6465
}
6566

@@ -69,7 +70,7 @@ void dot_event()
6970
while (true) {
7071
wait(4);
7172
if (!iface.is_connected()) {
72-
print_function("Connection not ready...\n");
73+
print_function(".");
7374
} else {
7475
break;
7576
}
@@ -203,7 +204,8 @@ int main()
203204
/* Set network credentials here, e.g., APN*/
204205
iface.set_credentials(MBED_CONF_APP_APN, MBED_CONF_APP_USERNAME, MBED_CONF_APP_PASSWORD);
205206

206-
print_function("\n\nmbed-os-example-cellular, Connecting...\n");
207+
print_function("\n\nmbed-os-example-cellular\n");
208+
print_function("Establishing connection ");
207209
dot_thread.start(dot_event);
208210

209211
/* Attempt to connect to a cellular network */

0 commit comments

Comments
 (0)