Suscribe an offset, not a variable ?

Peer support for Air Manager desktop users

Moderators: russ, Ralph

Message
Author
oscarDelta77
Posts: 57
Joined: Sat Nov 26, 2016 9:58 pm

Suscribe an offset, not a variable ?

#1 Post by oscarDelta77 »

Hi there,

I'm looking for a way to makd a Thrustmaster MFD Cougar working with AirManager.

What i wish : use a touch screen under the MFd to display indications. Eg: normal buttons text set to green, and highlighted in red when pressed (so, change an image)

With FSUIPC, i can send to an offset the value of the pressed button. Is it possible to link this offset to Airmanag, instead of a an MSFS variable ?

Not sure to be clear enough, sorry ! :oops:

User avatar
Ralph
Posts: 7921
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Suscribe an offset, not a variable ?

#2 Post by Ralph »

Search for FSUIPC and you'll find your answer(s).

oscarDelta77
Posts: 57
Joined: Sat Nov 26, 2016 9:58 pm

Re: Suscribe an offset, not a variable ?

#3 Post by oscarDelta77 »

Well, i'm trying, but that's not so clear, as i don't really know what i'm looking for !

A link to an example would be great ...

Thanks for you reply ! :)

oscarDelta77
Posts: 57
Joined: Sat Nov 26, 2016 9:58 pm

Re: Suscribe an offset, not a variable ?

#4 Post by oscarDelta77 »

Ok, that's not possible :
Sounds like a mystery to me :mrgreen: But the answer is no, no offsets, only LVAR's. Offsets are FSUIPC only, we do not want to support FSUIPC, it's a nearly deprecated system

User avatar
Ralph
Posts: 7921
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Suscribe an offset, not a variable ?

#5 Post by Ralph »

FSUIPC uses Lvars as well, they're just 'masked' as offsets. Except for some special aircraft like PMDG. But in most cases you can use the Lvar within Air Manager, if you can find it.

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Suscribe an offset, not a variable ?

#6 Post by Sling »

Why even bother with the complication of offsets. AM can read a game controller directly. Details are on the wiki API pages.
Last edited by Sling on Thu Mar 18, 2021 4:58 pm, edited 1 time in total.

oscarDelta77
Posts: 57
Joined: Sat Nov 26, 2016 9:58 pm

Re: Suscribe an offset, not a variable ?

#7 Post by oscarDelta77 »

@Sling, thanks for your help.

I've tried your code :

Code: Select all

function callback(type, index, value)
    if value == true then value = "true"
    elseif value == false then value = "false" end
    print("Type = " .. type .. ", Index = " .. index .. ", Value = " .. value)
end

list = game_controller_list()

for k, v in pairs(list) do
   print(v)
   -- if v == "" then game_controller_add(v, callback) end
   if v == "F16 MFD 1" then game_controller_add(v, callback) end
end
it works fine if add a Saïtek controller (like yoke), but AM 4.0 beta 31 crashes when i try to add F16 MFD 1

Code: Select all

INFO - F16 MFD 1
Regards,
Oliver.

User avatar
Ralph
Posts: 7921
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Suscribe an offset, not a variable ?

#8 Post by Ralph »

The joystick API is a bit experimental. Shouldn't crash, but then again we can't promise it won't ;)

User avatar
jph
Posts: 2856
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: Suscribe an offset, not a variable ?

#9 Post by jph »

Ralph wrote: Thu Mar 18, 2021 10:28 am The joystick API is a bit experimental. Shouldn't crash, but then again we can't promise it won't ;)
@Ralph
;) It is still a damn good option !
to @oscarDelta77 , just a thought, are you running - or auto starting, the Thrustmaster software when attempting to use the unit ?
Also, thanks for mentioning the MFD unit - I had completely forgotten about those ! Might need to buy a couple. ;) I looked at them a few years ago and was impressed. Then they were out of sight and out of mind. Also thanks to Tony - @Sling - for bringing up the AM game controller stuff. Bloody Nice ! :) - I had completely missed that one. What a super option and addition, even if it is early in development.
Joe
Joe. CISSP, MSc.

oscarDelta77
Posts: 57
Joined: Sat Nov 26, 2016 9:58 pm

Re: Suscribe an offset, not a variable ?

#10 Post by oscarDelta77 »

Ralph wrote: Thu Mar 18, 2021 10:28 am The joystick API is a bit experimental. Shouldn't crash, but then again we can't promise it won't ;)
@Ralph : It's a bit experimental, and it's might be "a must have" soon ! No luck for for me with MFD ! ;)
Also thanks to Tony - @Sling - for bringing up the AM game controller stuff. Bloody Nice ! :)
Yes ! i didn't know it was possible ! It's not easy to find a solution as we don't know where and how to dig ! :)
to @oscarDelta77 , just a thought, are you running - or auto starting, the Thrustmaster software when attempting to use the unit ?
@Joe : Well, i don't think so ! Actualy i d'ont need Thrustmaster's sofware, as it can't do what i want. I will make further tests and let you know .

Oliver.

Post Reply