Cockpit

* User Profile

Welcome, Guest. Please login or register.

Login with username, password and session length

Who's Online

  • *Users: 0
  • *Guests: 61
  • *Total: 61

Our Discord

Author Topic: Lua code help needed=Answered !  (Read 1087 times)

Offline Stinger2k2

  • Forum GURU
  • *
  • Posts: 15
  • Aviation Enthusiast
  • First Name: Keith
  • Home Location: Bexhill , England
Lua code help needed=Answered !
« on: February 11, 2017, 08:09:20 AM »
Hi all,
 
Can a LUA expert have a look at this for me please to see what I am doing wrong...
 
The aircraft I am working with is the Carenado Phenom 300.
 
This is what I see in the LINDA tracer when right click the ALT SEL knob in the aircraft VC to switch between altitude increments of 100 or 1000.
******
Watching new LVar: H850XPAltWheelPUSHTOGGLE = 0
LVar: H850XPAltWheelPUSHTOGGLE = 1
LVar: H850XPAltWheelPUSHTOGGLE = 0
LVar: H850XPAltWheelPUSHTOGGLE = 1
********
This is the LUA function I wrote .....
********
function alt_incr_toggle_100 ()
     ipc.writeLvar("HP850XPAltwheelPUSHTOGGLE", 1)
end
function alt_incr_toggle_1000 ()
     ipc.writeLvar("HP850XPAltwheelPUSHTOGGLE", 0)
end
********
I then assigned this onto a button in LINDA using the fields ON PRESS and ON RELEASE.
 
However when I watch the same Lvar in the tracer while pushing and releasing the assigned button the tracer shows no change? LINDA sees the button as working (i.e when I push the button LINDA moves to assign button position 30)
 
This is similar code that I have written for other switch functions and they work ok.
 
Any ideas?
 
 
Regards
Stinger
« Last Edit: February 11, 2017, 10:34:59 AM by Stinger2k2 »

Offline Stinger2k2

  • Forum GURU
  • *
  • Posts: 15
  • Aviation Enthusiast
  • First Name: Keith
  • Home Location: Bexhill , England
Re: Lua code help needed--Answered
« Reply #1 on: February 11, 2017, 10:34:33 AM »
Ok, sorted myself out now thanks.

 

Recent Posts

Hi everyone!
by Joe Lavery
[Today at 03:15:03 AM]
panel sismo oh
by gufau
[August 17, 2019, 04:17:00 AM]
Worldflight 2019 Open for Business
by FredK
[August 16, 2019, 07:00:29 PM]
Official WF 2019 Route
by FredK
[August 16, 2019, 06:58:41 PM]
My next sim?
by fsaviator
[August 16, 2019, 06:54:51 PM]
What have you done for your simulator today?
by blueskydriver
[August 14, 2019, 10:35:26 AM]
Shipping Woes
by Ed
[August 13, 2019, 11:55:37 AM]
Looking for gear lever from 747-400, 757
by navymustang
[August 13, 2019, 10:05:44 AM]
737-800 Front window post size
by kurt-olsson
[August 13, 2019, 06:57:39 AM]
Quick way to attach low res/smaller file size pics in your posts...
by Vincent T.
[August 12, 2019, 09:58:46 PM]
Cant post attachments from my iphone
by Trevor Hale
[August 12, 2019, 09:26:08 AM]
For Sale: Engravity 737 Window Frames
by Caflyt
[August 11, 2019, 05:02:28 PM]
737-800 Arduino X-Plane Build
by kurt-olsson
[August 10, 2019, 01:43:57 PM]
Help identifying a connector
by kurt-olsson
[August 10, 2019, 10:59:31 AM]
items/oem from overhead
by gufau
[August 09, 2019, 12:06:59 PM]
For Sale GoFlight Jet Console, 2 Private Pilot Racks all with GoFlight Modules.
by blueskydriver
[August 08, 2019, 09:40:02 PM]
OK, So here we go!
by Vincent T.
[August 07, 2019, 04:48:39 PM]
Flightdeck Solutions Works with X-Plane11
by Michael_B737_ATP
[August 07, 2019, 02:59:21 PM]
Boeing Dual Linked Yokes for sale
by tennyson
[August 07, 2019, 07:34:58 AM]
CPFLight Backlighting
by mickc
[August 05, 2019, 10:09:53 PM]
Three Projector 210 degree with P3D4
by Nat Crea
[August 03, 2019, 08:36:50 PM]
Looking for part numbers from the 737 NG IPC
by mickc
[August 02, 2019, 11:20:49 PM]
WF2019
by Sam Llorca
[August 02, 2019, 09:22:56 PM]
Teensy LC Fuel Panel A (top)
by bernard S
[August 02, 2019, 06:09:00 PM]
737 overhead
by nigel27
[July 28, 2019, 11:50:47 PM]
Teensy LC Fuel Panel B (low part)
by kurt-olsson
[July 24, 2019, 05:27:30 PM]
146 Simpit video collection
by Trevor Hale
[July 24, 2019, 02:31:25 PM]
Change the Forum Theme to suit your own Needs.
by RobertPrall
[July 23, 2019, 11:44:27 PM]
Looking to purchase, second-hand B737 ICS MIP panels with subpanels
by fairchild
[July 23, 2019, 10:57:07 AM]
X-Plane 11 multi-monitor & Fly Elise-ng - tuto
by blueskydriver
[July 20, 2019, 05:33:45 AM]