local appName="BT_Gain" local ctrlIdxA, ctrlIdxB, ctrlIdxC -------------------------------------------------------------------- -- Loop function local function loop() if(ctrlIdxA) then system.setControl(1, ((system.getInputs("P8") +1) * 0.35 -1), 0, 0) end if(ctrlIdxB) then system.setControl(2, ((system.getInputs("P8") +1) * 0.50 -1), 0, 0) end if(ctrlIdxC) then system.setControl(3, system.getInputs("P8") , 0, 0) end end -------------------------------------------------------------------- -- Init function local function init() lastTimeChecked = system.getTimeCounter() ctrlIdxA = system.registerControl(1, "Gain Vario","GVA") ctrlIdxB = system.registerControl(2, "Gain Beep", "GBE") ctrlIdxC = system.registerControl(3, "Gain Player","GPL") end -------------------------------------------------------------------- return { init=init, loop=loop, author="wsTech", version="0.91",name=appName}