July 30, 20196 yr Hi all, New to coding, new to LINDA and LUA but trying hard not to hit the forum with everything. However, could someone tell me where this code is going wrong? I'm trying to make a physical switch carry out a function and play a sound, switch state on or off: function button_OnPress (j0, b1) function ALL_FuelPumps_on () ipc.setbitsUB("3125", 0) ipc.setbitsUB("3125", 1) ipc.setbitsUB("3125", 2) ipc.setbitsUB("3125", 3) DspShow ("PUMP", "on") ref1=sound.play("fuel_pump") sound.adjust(ref1, 100) --ipc.sleep(50) function buttonOnRelease (j0, b1) function ALL_FuelPumps_off () ipc.clearbitsUB("3125", 0) ipc.clearbitsUB("3125", 1) ipc.clearbitsUB("3125", 2) ipc.clearbitsUB("3125", 3) DspShow ("PUMP", "off") sound.stop(ref1) --ipc.sleep(50) end Also, I would like to add a sound to a fuel warning. I think this will involve reading an LVar? Any tips on getting into that would be great. I know LINDA can do all this but I'm struggling to get my head around it's vast capacity. Thanks in advance, D
Archived
This topic is now archived and is closed to further replies.