Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Button On Release Issue

Featured Replies

I am having an issue with the action "On Button Release".setup: Saitek yoke, throttle, switch panel (no Saitek drivers), SPAD (for switch panel, all buttons unassigned in Linda, Global Shift not selected), FSUICP4, Linda 2.6.4. In my action.lua file which is very large I have 2 actions set on Button 0 on the yoke. one for On-Press and one for On-Release. The functions are below. I use button 0 as a 2nd shift command in each Linda shifted Panel. In each function in my action.lua file i evaluate BShift and based on it being a 0, i perform an action. I perform a second action if it is a 1.

 

The problem I am having is that sometimes after button press, BShift = 1 and remains a one after release. At this point, I can't change BShift to 0 on button 0 release. The function is not called. Once this happens, no matter how many times i press button 0 and release it, BShilft stays a one. Any idea what could cause this?

 

 

function InitVars ()

   Bshift = 0

end

 

 

-- ## LUA Options ############


-- Shift Button to Combine 2 rolls to each button in each Shifted mode. Button 0 on press
function B200_Button_Shift_0n()

BShift = 1

end


-- Button 0 on release
function B200_Button_Shift_off()

BShift = 0

end

 

thanks

 

Also I have notices that there may be issues calling funtions with simular names. Is there a limit on function character length recognition?

 

thanks

I am having an issue with the action "On Button Release".setup: Saitek yoke, throttle, switch panel (no Saitek drivers), SPAD (for switch panel, all buttons unassigned in Linda, Global Shift not selected), FSUICP4, Linda 2.6.4. In my action.lua file which is very large I have 2 actions set on Button 0 on the yoke. one for On-Press and one for On-Release. The functions are below. I use button 0 as a 2nd shift command in each Linda shifted Panel. In each function in my action.lua file i evaluate BShift and based on it being a 0, i perform an action. I perform a second action if it is a 1.

 

The problem I am having is that sometimes after button press, BShift = 1 and remains a one after release. At this point, I can't change BShift to 0 on button 0 release. The function is not called. Once this happens, no matter how many times i press button 0 and release it, BShilft stays a one. Any idea what could cause this?

 

 

function InitVars ()

   Bshift = 0

end

 

 

-- ## LUA Options ############

 

 

-- Shift Button to Combine 2 rolls to each button in each Shifted mode. Button 0 on press

function B200_Button_Shift_0n()

 

BShift = 1

 

end

 

 

-- Button 0 on release

function B200_Button_Shift_off()

 

BShift = 0

 

end

 

thanks

 

Also I have notices that there may be issues calling funtions with simular names. Is there a limit on function character length recognition?

 

thanks

Hi mcp5500

 

I'll start with you last point.  There is a hierarchy of modules and functions calls with the system Lua files (ie. common.lua) at the the lowest level, then the library files (ie. lib-user.lua), then the aircraft module (ie. actions.lua) and then the aircraft user (ie. user.lua) at the highest level.  A function name can be overridden (replaced by) a function of the same name at higher level. Such function names like all other variables in LUA are case sensitive.  Any new function that overrides a lower function can calls the lower function by name. (This is my understanding so if anyone wishes to correct me I welcome it.)

 

With the above in mind your use of InitVars might have unexpected implications as it is a common function name.  Your other functions appear correct. I find it useful to use the LINDA Console and adding _log('[test] Bshift set') comments to my code.

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

  • Author

Thanks Scott. If I understand you, the statement you provided will display BSift status in the consul at each place it is placed?

 

Thanks

Thanks Scott. If I understand you, the statement you provided will display BSift status in the consul at each place it is placed?

 

Thanks

The _log statement can have any wording that will help you debug your code. You need to insert one at each place where you want to check the code has reached during execution.

Andrew Gransden

Scotland, UK

LINDA Support/Developer - VATSIM and BAVirtual - Airbus Flyer

i7 1TB SSD GTX980 - FSX/P3D - Aerosoft Airbus A318/A319/A320/A321 - FS2Crew

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.