@autorunify/capacitor-nrfmesh 0.0.19 → 0.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
package com.autorunify.capacitor.nrfmesh
|
|
2
2
|
|
|
3
|
-
import kotlin.math.ln
|
|
4
|
-
import kotlin.math.pow
|
|
5
|
-
|
|
6
3
|
class Utils {
|
|
7
4
|
companion object {
|
|
8
5
|
fun Pwr2(value: Int): Int {
|
|
@@ -17,6 +14,10 @@ class Utils {
|
|
|
17
14
|
|
|
18
15
|
fun Log2(value: Long): Int {
|
|
19
16
|
val maskedVal = value and 0xFFFFFFFFL // Ensure we treat it as a 32-bit unsigned value
|
|
17
|
+
if (value == 0xFFFFL) {
|
|
18
|
+
return 0xFF;
|
|
19
|
+
}
|
|
20
|
+
|
|
20
21
|
if (maskedVal == 0L) {
|
|
21
22
|
return 0x00
|
|
22
23
|
}
|