Base class for the ublox-xxx-cellular-xxx classes. Cannot be used standalone, only inherited by classes that do properly useful stuff. Or, to put it another way, if you are using any of the ublox-xxx-cellular-xxx classes, you will need this class also.
Dependents: example-ublox-cellular-interface example-ublox-cellular-driver-gen HelloMQTT example-ublox-cellular-interface_r410M ... more
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
u-blox