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 ublox-cellular-base by
Revision 8:a15349fcab25, committed 2017-10-30
- Comitter:
- RobMeades
- Date:
- Mon Oct 30 14:46:22 2017 +0000
- Parent:
- 7:c2cf27a981b3
- Child:
- 9:2c997d7df4c6
- Child:
- 10:c4281fa79b8f
- Commit message:
- Remove assignment in condition to avoid ARM compiler warning.
Changed in this revision
| UbloxCellularBase.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/UbloxCellularBase.cpp Thu Sep 21 20:29:57 2017 +0000
+++ b/UbloxCellularBase.cpp Mon Oct 30 14:46:22 2017 +0000
@@ -688,7 +688,7 @@
// Initialise the modem.
bool UbloxCellularBase::init(const char *pin)
{
- bool gotImsi = false;
+ int x;
MBED_ASSERT(_at != NULL);
if (!_modem_initialised) {
@@ -705,11 +705,11 @@
// Try a few times to get the IMSI (since on some modems this can
// take a while to be retrieved, especially if a SIM PIN
// was set)
- for (int x = 0; (x < 3) && !(gotImsi = get_imsi()); x++) {
+ for (x = 0; (x < 3) && !get_imsi(); x++) {
wait_ms(1000);
}
- if (gotImsi) {
+ if (x < 3) { // If we got the IMSI, can get the others
if (get_imei() && // Get international mobile equipment identifier
get_meid() && // Probably the same as the IMEI
set_sms()) { // And set up SMS
