Skip to content

Commit

Permalink
Merge remote-tracking branch 'HandyMenny/huawei-fix'
Browse files Browse the repository at this point in the history
  • Loading branch information
mroczis committed May 19, 2022
2 parents 01b003a + 81c1df1 commit d9d63d4
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ internal fun CellIdentityNr.mapCell(subId: Int, connection: IConnection, signal:

@TargetApi(Build.VERSION_CODES.Q)
internal fun CellSignalStrengthNr.mapSignal(): SignalNr {
val ssRsrp = ssRsrp.inRangeOrNull(SignalNr.RSRP_RANGE)
val ssRsrq = ssRsrq.inRangeOrNull(SignalNr.RSRQ_RANGE)
val ssRsrp = ssRsrp.inRangeOrNull(SignalNr.RSRP_RANGE) ?: (ssRsrp * -1).inRangeOrNull(SignalNr.RSRP_RANGE)
val ssRsrq = ssRsrq.inRangeOrNull(SignalNr.RSRQ_RANGE) ?: (ssRsrq * -1).inRangeOrNull(SignalNr.RSRQ_RANGE)
val ssSinr = ssSinr.inRangeOrNull(SignalNr.SINR_RANGE)

val csiRsrp = csiRsrp.inRangeOrNull(SignalNr.RSRP_RANGE)
val csiRsrq = csiRsrq.inRangeOrNull(SignalNr.RSRQ_RANGE)
val csiRsrp = csiRsrp.inRangeOrNull(SignalNr.RSRP_RANGE) ?: (csiRsrp * -1).inRangeOrNull(SignalNr.RSRP_RANGE)
val csiRsrq = csiRsrq.inRangeOrNull(SignalNr.RSRQ_RANGE) ?: (csiRsrq * -1).inRangeOrNull(SignalNr.RSRQ_RANGE)
val csiSinr = csiSinr.inRangeOrNull(SignalNr.SINR_RANGE)

return SignalNr(
Expand Down

0 comments on commit d9d63d4

Please sign in to comment.