New StreamDeck Plugin - Page 10 - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 05-25-2020, 04:13 PM   #91
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

Quote:
Originally Posted by slaintemaith View Post
Anyone tell me how to get the F-18 SAI cage knob to work with one or two stream deck buttons?
I can't seem to make it go.
Not sure how much help you need in getting it working.

Looks like its ID 213 with a decimal number. Without testing (I'll take a look tonight if I have time), I'd guess it's a standard 0 for caged and 1 for un-caged (or vice-versa)

I'd monitor ID 213 in the text change box (3'rd option of the plugin) and cage/uncage the knob to see the value change live on the stream deck. That will tell you which values it needs to cage/uncage, and then use those values to send them in the first option.
nosaMtrevoC is offline   Reply With Quote
Old 05-26-2020, 02:36 AM   #92
X-31_VECTOR
Junior Member
 
X-31_VECTOR's Avatar
 
Join Date: Feb 2020
Location: Virginia, USA
Posts: 78
Default

Hi Ctytler, quick question: am I correct that it is not possible to have an image state change and a title text change set for the same button? Or am I doing something wrong?

Background: I'm trying to program the Master Arm switch in the UH-1H, which is a three-way switch that has Off, Safe and Arm positions. I've had no problem getting the title text change function to display the state of the switch (-1=OFF,0=SAFE,1=ARM), but I'd also like to have the "Arm" position trigger a different (second state) icon since it's not possible to have different text colors for the different title text options on the same switch.

Thanks again for this amazing tool, and your excellent tutorial videos!
X-31_VECTOR is offline   Reply With Quote
Old 05-26-2020, 01:36 PM   #93
slaintemaith
Junior Member
 
Join Date: Jan 2009
Posts: 99
Default

Quote:
Originally Posted by nosaMtrevoC View Post
Not sure how much help you need in getting it working.

Looks like its ID 213 with a decimal number. Without testing (I'll take a look tonight if I have time), I'd guess it's a standard 0 for caged and 1 for un-caged (or vice-versa)

I'd monitor ID 213 in the text change box (3'rd option of the plugin) and cage/uncage the knob to see the value change live on the stream deck. That will tell you which values it needs to cage/uncage, and then use those values to send them in the first option.
ID 214 gets mixed up with it somehow and in a way that I cannot seem to figure out.
It's as if it 213 won't work unless 214 is at a particular value.
I'm not smart enough to figure out how to shift them.

*Edit*
Got it sorted. Seems the knob needs to be three separate buttons one for 'CW' and one for 'CCW,' and one for push/pull.
It was more fun than the parking brake.

Last edited by slaintemaith; 05-26-2020 at 02:24 PM.
slaintemaith is offline   Reply With Quote
Old 05-26-2020, 02:55 PM   #94
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

Quote:
Originally Posted by X-31_VECTOR View Post
Hi Ctytler, quick question: am I correct that it is not possible to have an image state change and a title text change set for the same button? Or am I doing something wrong?

Background: I'm trying to program the Master Arm switch in the UH-1H, which is a three-way switch that has Off, Safe and Arm positions. I've had no problem getting the title text change function to display the state of the switch (-1=OFF,0=SAFE,1=ARM), but I'd also like to have the "Arm" position trigger a different (second state) icon since it's not possible to have different text colors for the different title text options on the same switch.

Thanks again for this amazing tool, and your excellent tutorial videos!
It is absolutely possible. Many of my switches show text change state and image change.

image change is second set of options and can monitor the same or different ID as the third option. It cannot change states 3 times (for a three way), but you could absolutely show armed or not. (e.g. text shows actual state -1, 0 or 1, but if armed then red light on button glows.
nosaMtrevoC is offline   Reply With Quote
Old 05-26-2020, 02:56 PM   #95
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

Quote:
Originally Posted by slaintemaith View Post
ID 214 gets mixed up with it somehow and in a way that I cannot seem to figure out.
It's as if it 213 won't work unless 214 is at a particular value.
I'm not smart enough to figure out how to shift them.

*Edit*
Got it sorted. Seems the knob needs to be three separate buttons one for 'CW' and one for 'CCW,' and one for push/pull.
It was more fun than the parking brake.
Glad you got it sorted.
nosaMtrevoC is offline   Reply With Quote
Old 05-26-2020, 06:12 PM   #96
analooginen
Junior Member
 
Join Date: Aug 2019
Location: Finland
Posts: 4
Default

Few questions:

-Is it possible to add a counter for something that doesnt have a gauge or clickable data, for example: BF109-K4 mk108 cannon ammo amount.

-I can find a dcs id for altitude (Bf109 again), but the value just starts from like 0.0001 and ends up at 1. Any way to make a conversion for this value to meters for example?

Thanks.
analooginen is offline   Reply With Quote
Old 05-26-2020, 09:08 PM   #97
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

Quote:
Originally Posted by analooginen View Post
Few questions:

-Is it possible to add a counter for something that doesnt have a gauge or clickable data, for example: BF109-K4 mk108 cannon ammo amount.

-I can find a dcs id for altitude (Bf109 again), but the value just starts from like 0.0001 and ends up at 1. Any way to make a conversion for this value to meters for example?

Thanks.
1. Gun Counter. You'll need to find the data that store the ammo info. Not sure personally, but now you have me wanting one, so I'll take a look.

2. Yes for altitude (check my video above) I have both and fuel and heading etc... this is why i originally posted my question on this thread. (I had heading information like 0.5000 which I wanted to make 180 by using 0.5000 *360 to output proper information).

My code above is doing what you are asking. You'll have to interpret it for your use case, but none the less it's a perfect example.

Keep in mind, if you are grabbing a needle position of the altitude it could be like the fuel guages and not linear in value. Make sure your output is linear (meaning 0.0100 is 100 feet and 0.0500 is 500 feet etc... not 0.0100 is 100 feet and 0.0325 is 500 feet) in which case it's much more complex, but still doable.
nosaMtrevoC is offline   Reply With Quote
Old 05-26-2020, 09:11 PM   #98
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

I always output the raw information that I want changed (e.g. heading information) and output it to a stream deck key first and then make a table of that data compared to my guages while flying the plane to make sure i understand the output.

e.g. guage in plane shows 70gal, raw output shows 0.9234, guage in plane shows 60 gal and raw output shows 0.8254 etc...
nosaMtrevoC is offline   Reply With Quote
Old 05-26-2020, 09:14 PM   #99
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

Sounds to me after reading your post again about your altitude value that you are not getting the altitude value ID, instead you are getting the altimeter needle position id which relates from .0001 to 1 the position of the altimeter needle.
nosaMtrevoC is offline   Reply With Quote
Old 05-26-2020, 09:26 PM   #100
nosaMtrevoC
Member
 
Join Date: May 2020
Location: Canada
Posts: 206
Default

I took a quick look at the bf-109 exportscript lua file and found the following

Code:
	[8] = "%.4f",	-- Altimeter_FinePtr {0.0, 1000.0} = {0.0, 1.0}
	[9] = "%.4f",	-- Altimeter_CoarsePtr {0.0, 13000.0} = {0.0, 1.0}
Looks to me (without testing) that these are the positions of the fine needle and the coars needle on the altimiter.

What we can deduce from the comments here are that

Altimeter_FinePtr (thousand feet total meaning it's the hundred foot needle)
Has altitude data from 0 - 1000 ' {0.0, 1000.0} or from 2,000-3,000 etc..
and the last brackets {0.0,1.0} means it will display this as raw information 0.000 - 1.000 defined by the %.4f formatting rule.

so 0.5000 is 500 feet.

To be more correct, it means the needle will be pointing at 500 feet when we are at 500 feet or 1,500 feet or 2,500 feet.

the next needle Altimeter_CoarsePtr goes from 0 to 13000.

At this very part of me writing this i realize its meters not feet, so change feet to meters in all the above (I'm lazy and busy right now)

so the Altimeter_CorsePtr goes from 0 to 13000M

We can probably just use this variable to give us meters

so if 0 is 0 meters and 1.0 is 13000m, then 0.5000 is 0.5000 * 13000 or 6500m

so you could use just that information to do this:

Code:
local digAltitude = mainPanelDevice:get_argument_value(9) * 13000

ExportScript.Tools.SendData(2000, string.format("%d", digAltitude).." M")
This should output your altitude in M like 6500 M

Last edited by nosaMtrevoC; 05-26-2020 at 09:29 PM.
nosaMtrevoC is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:57 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.