fix: convert SNR values to Float for decimal precision

This commit is contained in:
andrekir 2024-11-11 16:41:06 -03:00
parent 1ae65ef267
commit 1d992d5caf

View file

@ -33,7 +33,7 @@ private fun formatTraceroutePath(nodesList: List<String>, snrList: List<Int>): S
// use unknown SNR for entire route if snrList has invalid size
List(nodesList.size - 1) { -128 }
}.map { snr ->
val str = if (snr == -128) "?" else "${snr / 4}"
val str = if (snr == -128) "?" else "${snr / 4f}"
"$str dB"
}