Skip to content

Commit

Permalink
Cellular change only: fix uCellPwrGet3gppPowerSavingState().
Browse files Browse the repository at this point in the history
The function would return `U_CELL_PWR_3GPP_POWER_SAVING_STATE_AGREED_BY_NETWORK` instead of `U_CELL_PWR_3GPP_POWER_SAVING_STATE_ACTIVE_DEEP_SLEEP_ACTIVE` if called again while the module is already asleep.  This is now fixed.
  • Loading branch information
RobMeades committed Dec 20, 2022
1 parent 19a6265 commit 0c56afa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cell/src/u_cell_pwr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2443,7 +2443,8 @@ uCellPwr3gppPowerSavingState_t uCellPwrGet3gppPowerSavingState(uDeviceHandle_t c
*pApplication = pInstance->deepSleepBlockedBy;
}
} else {
if (pInstance->deepSleepState == U_CELL_PRIVATE_DEEP_SLEEP_STATE_PROTOCOL_STACK_ASLEEP) {
if ((pInstance->deepSleepState == U_CELL_PRIVATE_DEEP_SLEEP_STATE_PROTOCOL_STACK_ASLEEP) ||
(pInstance->deepSleepState == U_CELL_PRIVATE_DEEP_SLEEP_STATE_ASLEEP)) {
powerSavingState3gpp = U_CELL_PWR_3GPP_POWER_SAVING_STATE_ACTIVE;
if (uCellPrivateIsDeepSleepActive(pInstance)) {
powerSavingState3gpp = U_CELL_PWR_3GPP_POWER_SAVING_STATE_ACTIVE_DEEP_SLEEP_ACTIVE;
Expand Down

0 comments on commit 0c56afa

Please sign in to comment.