Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Gaming Input on Ship Console not working properly

Participant ,
Aug 17, 2021 Aug 17, 2021

Hi i just bought the Ship Console and plugged it in my Windows USB.

In Animate i use the GamingInput  API

 

public var gameInput:GameInput = new GameInput();

myDevice = GameInput.getDeviceAt(0);
myDevice.enabled = true; 

 

The Ship console is detected and i can also check how much controls it has supported

 

so i trace through all controls in an ENTER_FRAME to see if it is working

for (var i:int = 0; i < myDevice.numControls-1 ; i++) {
var cont = myDevice.getControlAt(i)
trace(i+":" + cont.value + " Name:" + cont.id )
}

 

And it works, every button, also the Steering Wheel works

But, and what  is frustrating me is:

The Ship Consiole has two throttles for steering boats with two engines.

 

When i try the trottles the values on my output are not changing at all. The rest of the Ship console, every single Button is working also the steering is working .

 

Here is a picture of the ship console

ship1.jpg

and here is a picture from the trace output. So i am lost as everything works except these 2 throttles.

And in windows the two throttles works. I can see it in the properties of the Throttle where you can test the ship simulator.

ship2.JPG

 

You see that there are 40 controls

 

Please help.

Michael

 

 

2.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2021 Aug 17, 2021

that looks like 26 buttons, a rudder and two engine controls. what's causing the discrepancy?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 17, 2021 Aug 17, 2021

I dont know maybe ther are internal 40 but ob the Device itself only 26 are used. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2021 Aug 17, 2021

well, test. or don't and hope someone else that has that console has already done this and will post a solution for you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 17, 2021 Aug 17, 2021

The controller is wrking on the Testscreen with comes with the controller. So why is Adobe Gameinput just dont read or communicate with the two throttles. with ALL other buttons and steering its working. So waiting is no choice for me. Maybe Haramn can look if this is a problem in Adobe Air ?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2021 Aug 17, 2021

it seems a lot quicker to me for you to test, but if you want to see if harman will answer you, go for it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 17, 2021 Aug 17, 2021

What should I test. Do you gave an idea what I should do ?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 17, 2021 Aug 17, 2021

you could start by pressing each button and noting what actionscript is using to reference it.  then try your rudder.

 

those all work (i assume) so you can map those if you want or just note them and use an enterframe loop to check the values of the remaining inputs.  ie, you should have a clear understand for each i of what getControlAt(i) is referencing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 25, 2021 Aug 25, 2021

That is what i did from beginning

I loop through the buttons but the Trottle is not delivering values

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2021 Aug 25, 2021

i would loop through all the properties of the controls that aren't known controls.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 25, 2021 Aug 25, 2021

can you give me a hint how to iterate through unknown controls ??

Maybe thats the solution.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2021 Aug 25, 2021

for example, to investigate BUTTON_6, i would use:

 

for (var s:String in myDevice.getControlAt(6)){

trace(s+" "+ myDevice.getControlAt(6)[s]);

}

 

 

actually, you could do them all:

 

 

for (var i:int = 0; i < myDevice.numControls-1 ; i++) {
var cont = myDevice.getControlAt(i)
trace("\n"+i+" ****");
for(var s:String in cont){
trace(s+" : "+cont[s{);
}
}

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 25, 2021 Aug 25, 2021

Ok i made a loop and i controlled in the debugger every control.

They all have the same metods and variables.

Debug_control.JPG

The producer of the STICK said, that they have Axis_6 and Axis_7 for the trottles, but Adobe is obnly showing until Axis_5. So can it be that thewre is a mailfunction inn the driver ? or Firmware of the joystick ?

so i checked all 41 controls like this.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 25, 2021 Aug 25, 2021

why do they all have value 0? 

 

during testing did you move your rudder off the zero mark?  did you move your throttles off the zero mark?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 26, 2021 Aug 26, 2021

The buttons  have always 0 when you press it then they have 1.

I assume htat the first 4 axis are not used, so the first Axis_5 is the rudder which is working.

According to  the company woho creates the ship console there should be an axis_6 and an axis_7 which i am not able to read out  the device.

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 01, 2024 Feb 01, 2024
LATEST

Hi SirRookie,

 

Can yu please provide me the program code files or github links for communicating with the ship console.

Like you got some output on console (in the above picture you pasted).Can you share me that program files or github links.

 

Thanks!

Naveen Kumar

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines