We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 4ad07d1 + 138c7d4 commit 700c8c3Copy full SHA for 700c8c3
src/SCRIPTS/BF/ui.lua
@@ -121,6 +121,10 @@ local function processMspReply(cmd,rx_buf)
121
raw_val = bit32.lshift(raw_val, (idx-1)*8)
122
f.value = bit32.bor(f.value, raw_val)
123
end
124
+ local bits = #f.vals * 8
125
+ if f.min < 0 and bit32.btest(f.value, bit32.lshift(1, bits - 1)) then
126
+ f.value = f.value - (2 ^ bits)
127
+ end
128
f.value = f.value/(f.scale or 1)
129
130
0 commit comments