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.
Revision 1:9f135d5ea1f9, committed 2019-09-15
- Comitter:
- AustinKim
- Date:
- Sun Sep 15 23:43:17 2019 +0000
- Parent:
- 0:7a10bb221e55
- Commit message:
- Update main.cpp
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7a10bb221e55 -r 9f135d5ea1f9 main.cpp
--- a/main.cpp Wed Sep 11 07:34:25 2019 +0000
+++ b/main.cpp Sun Sep 15 23:43:17 2019 +0000
@@ -141,7 +141,7 @@
int main()
{
char ping_dest_1st[] = "8.8.8.8";
- char ping_dest_2nd[] = "www.google.com";
+ char ping_dest_2nd[] = "www.google.com";
serialPcInit();
catm1DeviceInit();
@@ -164,14 +164,14 @@
getNetworkStatus_WM01();
- setContextActivate_WM01();
-
- myprintf("[Ping] Host: %s\r\n", ping_dest_1st);
+ setContextActivate_WM01();
+
+ myprintf("[Ping] Host : %s\r\n", ping_dest_1st);
printPingToHost_WM01(ping_dest_1st, 4);
wait_ms(2000);
- myprintf("[Ping] Host: %s\r\n", ping_dest_2nd);
+ myprintf("[Ping] Host : %s\r\n", ping_dest_2nd);
printPingToHost_WM01(ping_dest_2nd, 4);
setContextDeactivate_WM01();
@@ -332,13 +332,13 @@
return;
}
- _parser->set_timeout((1000 * pingnum) + 2000);
+ _parser->set_timeout(1000 * pingnum);
if(_parser->send("AT*PING=%s,%d", host, pingnum) && _parser->recv("OK"))
{
_parser->read(resp_str, sizeof(resp_str));
- devlog("%s\r\n", resp_str);
+ devlog("%s", resp_str);
}
_parser->set_timeout(WM01_DEFAULT_TIMEOUT);