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-interface_r410M example-ublox-mbed-client example-ublox-cellular-interface ... more
Revision 42:98808477a691, committed 2020-01-06
- Comitter:
- mudassar0121
- Date:
- Mon Jan 06 14:29:40 2020 +0500
- Parent:
- 41:69998003d95a
- Commit message:
- Replaced depreciated wait_ms with ThisThread::sleep_for
Changed in this revision
diff -r 69998003d95a -r 98808477a691 TESTS/unit_tests/default/main.cpp
--- a/TESTS/unit_tests/default/main.cpp Wed Jan 01 11:47:24 2020 +0500
+++ b/TESTS/unit_tests/default/main.cpp Mon Jan 06 14:29:40 2020 +0500
@@ -312,7 +312,7 @@
TEST_ASSERT(strcmp(sender_address.get_ip_address(), host_address->get_ip_address()) == 0);
TEST_ASSERT(sender_address.get_port() == host_address->get_port());
}
- wait_ms(10);
+ ThisThread::sleep_for(10);
}
timer.stop();
timer.reset();
@@ -352,7 +352,7 @@
count += x;
tr_debug("%d byte(s) sent, %d left to send.", count, size - count);
}
- wait_ms(10);
+ ThisThread::sleep_for(10);
}
timer.stop();
@@ -382,7 +382,7 @@
recv_size += x;
tr_debug("%d byte(s) echoed back so far, %d to go.", recv_size, size - recv_size);
}
- wait_ms(10);
+ ThisThread::sleep_for(10);
}
TEST_ASSERT(recv_size == size);
y = memcmp(send_data, recv_data, size);
@@ -1176,7 +1176,7 @@
// Rebooting modem for settings to take effect
TEST_ASSERT(interface->reboot_modem());
tr_debug("Reboot successful\n");
- wait_ms(5000);
+ ThisThread::sleep_for(5000);
TEST_ASSERT(interface->init(MBED_CONF_APP_DEFAULT_PIN));
@@ -1226,7 +1226,7 @@
//re-apply default mno profile
TEST_ASSERT(interface->set_mno_profile(UbloxATCellularInterface::STANDARD_EU));
TEST_ASSERT(interface->reboot_modem());
- wait_ms(5000);
+ ThisThread::sleep_for(5000);
TEST_ASSERT(interface->init(MBED_CONF_APP_DEFAULT_PIN));
TEST_ASSERT(interface->disable_power_saving_mode());
}
diff -r 69998003d95a -r 98808477a691 TESTS/unit_tests/dynamic/main.cpp
--- a/TESTS/unit_tests/dynamic/main.cpp Wed Jan 01 11:47:24 2020 +0500
+++ b/TESTS/unit_tests/dynamic/main.cpp Mon Jan 06 14:29:40 2020 +0500
@@ -240,7 +240,7 @@
TEST_ASSERT(interface->set_mno_profile(UbloxATCellularInterface::STANDARD_EU));
TEST_ASSERT(interface->reboot_modem());
tr_debug("Reboot successful\n");
- wait_ms(5000);
+ hisThread::sleep_for(5000);
}
}
TEST_ASSERT(interface->init(MBED_CONF_APP_DEFAULT_PIN));
diff -r 69998003d95a -r 98808477a691 UbloxATCellularInterface.cpp
--- a/UbloxATCellularInterface.cpp Wed Jan 01 11:47:24 2020 +0500
+++ b/UbloxATCellularInterface.cpp Mon Jan 06 14:29:40 2020 +0500
@@ -701,7 +701,7 @@
LOCK();
if (_at->send("AT+USOWR=%d,%d", socket->modem_handle, blk) && _at->recv("@")) {
- wait_ms(50);
+ ThisThread::sleep_for(50);
if ((_at->write(buf, blk) < (int) blk) ||
!_at->recv("OK")) {
success = false;
@@ -756,7 +756,7 @@
if (_at->send("AT+USOST=%d,\"%s\",%d,%d", socket->modem_handle,
address.get_ip_address(), address.get_port(), blk) &&
_at->recv("@")) {
- wait_ms(50);
+ ThisThread::sleep_for(50);
if ((_at->write(buf, blk) >= (int) blk) &&
_at->recv("OK")) {
} else {