October 12, 201114 yr Hallo Günter, found, that your script for changing the Baro:Mode inHG/hpa does not work.I tried this one and it works function NGX_EFIS_BARO_MODE_hpa () ipc.writeLvar("ngx_switch_366_a", 100) --ipc.control(69998, 16384) DspShow ("BARO", "HPA")endfunction NGX_EFIS_BARO_MODE_inHg () ipc.writeLvar("ngx_switch_366_a", 0) --ipc.control(69998, 8192) DspShow ("BARO", "inHg")end I see you often using ipc.control... in your scripts instead of ipc.writeLVar(...)Is there a special reason for? With kind regardsRoland PohlVice chairman FSC e.V.
October 13, 201114 yr Hello Roland, found, that your script for changing the Baro:Mode inHG/hpa does not work. yes, I had found that a few weeks ago?Which version of the NGX module do you use? My code here is function NGX_EFIS_BARO_MODE_hpa () if ipc.readLvar('ngx_switch_366_a') == 0 then ipc.control(69998, 536870912) end DspShow ("BARO", "HPA")endfunction NGX_EFIS_BARO_MODE_inHg () if ipc.readLvar('ngx_switch_366_a') == 100 then ipc.control(69998, 536870912) end DspShow ("BARO", "inHg")end your code above is not working, sorry. The NGX uses the Lvars only for moving the 3D models of the switches in the VC.When you test your code, you will see the switch moving, but the system is not changing. ipc.controls are used to change the system itself. Unfortunately, the NGX just toggles the systems, thats why in both cases we haveipc.control(69998, 536870912) But: we read out the state of the switch before and say:only when switch is in position XY, toggle the system. So we are able to make solid ON/OFF fucntions ... hope you understood... Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
October 13, 201114 yr Author Hi Günter,that was explained good, I understood.I thought with the knowledge of LVars it is easy to make things work, that was a bit blue eyed :-) BTW I use V1.2 of NGX-Modul, in 1.3 the fast rotation (Alt, Speed, HDG) doesn't work for me. With kind regardsRoland PohlVice chairman FSC e.V.
October 13, 201114 yr yep, in 1.2 the baro code was wrong I'll have a look in the fast rotations tonight ... Guenter Steiner -------------------------------------------------------------------------------------- Betatester for: A2A, LORBY, FSR-Pillow Tester --------------------------------------------------------------------------------------
October 17, 201114 yr Thank you for your explanation, Günter, which has added another piece to the jigsaw for me, too. (And thank you for asking the question, Roland). Cheers, Brian
Create an account or sign in to comment