Skip to content

Commit 629b776

Browse files
lichtlDynamikArray
authored andcommitted
Add percent unit into LUA (#6)
FIXED: percentage callout for openTx 2.1
1 parent 58ac294 commit 629b776

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

KISSdata.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ local blnMenuMode = 0
66
local mahTarget = 900
77
local mahAlertPerc = 10
88

9+
-- OpenTX 2.0 - Percent Unit = 8 // OpenTx 2.1 - Percent Unit = 13
10+
-- see: https://opentx.gitbooks.io/opentx-lua-reference-guide/content/general/playNumber.html
11+
local percentUnit = 13
12+
913
local lastMahAlert = 0
1014

1115

@@ -33,7 +37,7 @@ end
3337

3438
--MahAlert and Logging of last Value Played
3539
local function playMahPerc(percVal)
36-
playNumber(percVal,8)
40+
playNumber(percVal,percentUnit)
3741
lastMahAlert = percVal -- Set our lastMahAlert
3842
end
3943

0 commit comments

Comments
 (0)