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.
Dependents: example-ublox-cellular-interface example-ublox-cellular-driver-gen HelloMQTT example-ublox-cellular-interface_r410M ... more
Revision 37:a2466fcd63c3, committed 2020-01-06
- Comitter:
- mudassar0121
- Date:
- Mon Jan 06 14:25:07 2020 +0500
- Parent:
- 36:2f8ef6ac16dc
- Commit message:
- Replace depreciated wait_ms with ThisThread::sleep_for
Changed in this revision
| UbloxATCmdParser.cpp | Show annotated file Show diff for this revision Revisions of this file |
| UbloxCellularBase.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 2f8ef6ac16dc -r a2466fcd63c3 UbloxATCmdParser.cpp
--- a/UbloxATCmdParser.cpp Fri Nov 08 12:32:37 2019 +0500
+++ b/UbloxATCmdParser.cpp Mon Jan 06 14:25:07 2020 +0500
@@ -41,7 +41,7 @@
ATCmdParser::set_timeout(1000);
while(retries--) {
ATCmdParser::putc('A');
- wait_ms(10); //wait a little
+ ThisThread::sleep_for(10); //wait a little
if ( (ATCmdParser::send("AT")) && (ATCmdParser::recv("OK")) ) { //check if modem is awake and accepting commands
status = true;
break;
diff -r 2f8ef6ac16dc -r a2466fcd63c3 UbloxCellularBase.cpp
--- a/UbloxCellularBase.cpp Fri Nov 08 12:32:37 2019 +0500
+++ b/UbloxCellularBase.cpp Mon Jan 06 14:25:07 2020 +0500
@@ -610,7 +610,7 @@
tr_info("Powering up modem...");
modem_init();
/* Give modem a little time to settle down */
- wait_ms(250);
+ ThisThread::sleep_for(250);
for (int retry_count = 0; !success && (retry_count < 20); retry_count++) {
//In case of SARA-R4, modem takes a while to turn on, constantly toggling the power pin every ~2 secs causes the modem to never power up.
@@ -633,7 +633,7 @@
// Set the final baud rate
if (_at->send("AT+IPR=%d", _baud) && _at->recv("OK")) {
// Need to wait for things to be sorted out on the modem side
- wait_ms(100);
+ ThisThread::sleep_for(100);
((UARTSerial *)_fh)->set_baud(_baud);
// Turn off modem echoing and turn on verbose responses
@@ -666,7 +666,7 @@
at_set_timeout(1000);
if (_at->send("AT")) {
// C027 needs a delay here
- wait_ms(100);
+ ThisThread::sleep_for(100);
if (_at->recv("OK")) {
success = true;
}
@@ -809,7 +809,7 @@
}
/* wait for a second before retry */
- wait_ms(1000);
+ ThisThread::sleep_for(1000);
}
if (done) {
@@ -851,7 +851,7 @@
if (mno_profile != MBED_CONF_APP_DEFAULT_MNO_PROFILE && set_mno_profile((MNOProfile)MBED_CONF_APP_DEFAULT_MNO_PROFILE)) {
reboot_modem();
while(is_modem_ready() == false) {
- wait_ms(1000);
+ ThisThread::sleep_for(1000);
}
setup_modem();
mno_profile = MBED_CONF_APP_DEFAULT_MNO_PROFILE;
@@ -898,7 +898,7 @@
// take a while to be retrieved, especially if a SIM PIN
// was set)
for (x = 0; (x < 3) && !get_imsi(); x++) {
- wait_ms(1000);
+ ThisThread::sleep_for(1000);
}
if (x < 3) { // If we got the IMSI, can get the others