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 MTS-Cellular by
Diff: Test/TestSMS.h
- Revision:
- 52:2cb58398a4f9
- Parent:
- 48:3f9d82915e83
- Child:
- 56:43205bd2752a
diff -r ffc556ba33f7 -r 2cb58398a4f9 Test/TestSMS.h
--- a/Test/TestSMS.h Tue Aug 05 18:35:22 2014 +0000
+++ b/Test/TestSMS.h Mon Aug 11 16:03:19 2014 +0000
@@ -56,17 +56,8 @@
}
}
- //For determining when the SIM card is ready
- std::string result;
- for (int i = 0; i < 25; i++) {
- if (i >= 25) {
- Test::assertTrue(false);
- }
- if(radio->sendBasicCommand("AT+CMGD=1,4", 1000) == MTS_SUCCESS) {
- break;
- }
- wait(1);
- }
+ //Wait until the SIM card is ready
+ while (radio->sendBasicCommand("AT+CMGD=1,4", 1000) != MTS_SUCCESS);
Test::assertTrue(radio->deleteAllReceivedSms() == MTS_SUCCESS);
Test::assertTrue(radio->getReceivedSms().size() == 0);
@@ -81,8 +72,8 @@
}
wait(1);
}
- //Response doesn't contain "My Number", and thus will always fail
- //Code seems to not be the same for UIP versus EasyIP
+
+ //Read phone number from radio
if (response.find("+CNUM:") != string::npos) {
parts = Text::split(response, ",");
number = parts[1];
