ublox-cellular-base_mno_pr
Diff: UbloxCellularBase.cpp
- Revision:
- 22:779971811c46
- Parent:
- 20:31d5e048fbfa
- Child:
- 23:eaab8e812a5d
--- a/UbloxCellularBase.cpp Fri Mar 22 15:47:18 2019 +0500 +++ b/UbloxCellularBase.cpp Wed Apr 10 12:05:55 2019 +0500 @@ -1095,7 +1095,7 @@ return success; } -bool UbloxCellularBase::get_modem_rat(RAT *selected_rat, RAT *preferred_rat, RAT *second_preferred_rat) +bool UbloxCellularBase::get_modem_rat(int *selected_rat, int *preferred_rat, int *second_preferred_rat) { bool success = false; char buf[24] = {0x00}; @@ -1114,11 +1114,11 @@ LOCK(); if (_at->send("AT+URAT?") && _at->recv("%23[^\n]\nOK\n", buf)) { - if (sscanf(buf, "+URAT: %d,%d,%d", (int*)selected_rat, (int*)preferred_rat, (int*)second_preferred_rat) == 3) { + if (sscanf(buf, "+URAT: %d,%d,%d", selected_rat, preferred_rat, second_preferred_rat) == 3) { success = true; - } else if (sscanf(buf, "+URAT: %d,%d", (int*)selected_rat, (int*)preferred_rat) == 2) { + } else if (sscanf(buf, "+URAT: %d,%d", selected_rat, preferred_rat) == 2) { success = true; - } else if (sscanf(buf, "+URAT: %d", (int*)selected_rat) == 1) { + } else if (sscanf(buf, "+URAT: %d", selected_rat) == 1) { success = true; } } @@ -1160,9 +1160,9 @@ { bool return_val = false; - MNOProfile mno_profile; + int mno_profile; if (get_mno_profile(&mno_profile)) { - tr_info("Current MNO profile is: %d", (int)mno_profile); + tr_info("Current MNO profile is: %d", mno_profile); if (mno_profile != profile) { if (is_registered_csd() || is_registered_psd() || is_registered_eps()) { @@ -1188,7 +1188,7 @@ return return_val; } -bool UbloxCellularBase::get_mno_profile(MNOProfile *profile) +bool UbloxCellularBase::get_mno_profile(int *profile) { bool return_val = false; @@ -1199,7 +1199,7 @@ LOCK(); MBED_ASSERT(_at != NULL); - if ( (_at->send("AT+UMNOPROF?") && _at->recv("+UMNOPROF: %d", (int*)profile) && _at->recv("OK")) ) { + if ( (_at->send("AT+UMNOPROF?") && _at->recv("+UMNOPROF: %d", profile) && _at->recv("OK")) ) { return_val = true; }