Skip to content

Commit 10954d4

Browse files
authored
Merge pull request #460 from klutvott123/min-check
Check for min attribute
2 parents 378ba2f + 0877a7b commit 10954d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/SCRIPTS/BF/ui.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ local function processMspReply(cmd,rx_buf)
122122
f.value = bit32.bor(f.value, raw_val)
123123
end
124124
local bits = #f.vals * 8
125-
if f.min < 0 and bit32.btest(f.value, bit32.lshift(1, bits - 1)) then
125+
if f.min and f.min < 0 and bit32.btest(f.value, bit32.lshift(1, bits - 1)) then
126126
f.value = f.value - (2 ^ bits)
127127
end
128128
f.value = f.value/(f.scale or 1)

0 commit comments

Comments
 (0)