Skip to content

Commit

Permalink
Merge branch 'fix/ONT_2806-lte_signal_change_from_dbm_to_rsrp' into '…
Browse files Browse the repository at this point in the history
…develop'

ONT-2806 - fix of the value for LTE and NR signal strength

See merge request android/nettest!231
  • Loading branch information
Michal Cádrik committed Apr 20, 2021
2 parents dc840e0 + d71e404 commit 2abb4d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/java/at/specure/util/NetmonsterExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ fun SignalGsm.toSignalStrengthInfo(timestampNanos: Long): SignalStrengthInfo {
}

fun SignalLte.toSignalStrengthInfo(timestampNanos: Long): SignalStrengthInfo {
val signalValue = this.dbm ?: this.rsrp?.toInt()
val signalValue = this.rsrp?.toInt()
return SignalStrengthInfoLte(
transport = TransportType.CELLULAR,
value = signalValue,
Expand All @@ -255,9 +255,9 @@ fun SignalLte.toSignalStrengthInfo(timestampNanos: Long): SignalStrengthInfo {
fun SignalNr.toSignalStrengthInfo(timestampNanos: Long): SignalStrengthInfo {
return SignalStrengthInfoNr(
transport = TransportType.CELLULAR,
value = this.dbm,
value = this.ssRsrp,
rsrq = null,
signalLevel = calculateNRSignalLevel(this.dbm),
signalLevel = calculateNRSignalLevel(this.ssRsrp),
min = NR_RSRP_SIGNAL_MIN,
max = NR_RSRP_SIGNAL_MAX,
timestampNanos = timestampNanos,
Expand Down

0 comments on commit 2abb4d9

Please sign in to comment.