Jump to content
Sign in to follow this  
john44111

Duplicate Joysticks -Same Arduino model 2 become one.

Recommended Posts

using latest paid FSUIPC, Linda, the FBW a320 module

 

and I am using ardunion leonardos.

 

Problem is when I install them. They are two separate joysticks. After a while of adding buttons they start becoming the same.

 

so all button configs are identical on both. in the file that lists devices the first one is listed (That becomes the name of both in the Linda program. The second becomes "unidentified"

 

I feel like this is something simple. Ive been searching for a couple hours. (Not finding the right search terms maybe?) and I reinstalled Linda 2x.. it eventually overwrites both arduiinos?

 

Is this a known issue?

 

Share this post


Link to post
Share on other sites

LINDA (all versions) identify unique devices by their Vendor and Product IDs (VID/PID) plus a unique number (0-9). These are held in a common config-hid.LUA in /LINDA-cfg/system/. In addition if a device has a serial number this is also used.

If a device is moved to a different USB port this can cause LINDA problems in tracking each device correctly.

I would need to see the config-hid.LUA file for the aircraft you are having problems with.


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

Share this post


Link to post
Share on other sites

-- FBW A320 config-hid.lua @ 2203261617 (LINDA 4.1.4.281) --

-- ## Joystick ## (044F04050) ## {1} ############


-- ## toggle ## (234180360) ## {HIDNB} ############

JSTK["234180360"][6]="A32NX_OVHD_FUEL_PUMP_ALL_toggle"

-- ## Throttle ## (044F04070) ## {00000000001A} ############


-- ## Toggle ## (234180361) ## {HIDNB} ############

JSTK["234180361"][6]="A32NX_OVHD_FUEL_PUMP_ALL_toggle"
JSTK["234180361"][11]="A32nx_OVHD_APU_MASTER_toggle"

-- ## USB Box ## (601735220) ## {DTA00099} ############

see I named one PUSH and one TOGGLE. then it becomes two toggles.

 

 

Share this post


Link to post
Share on other sites

There are 2 similar devices with the VID=2341 and PID=8036. The unique ID are 0 and 1 as expected. They both have the identical serial number.

There should be no reason for these to become mixed up unless they are unplugged.

I don’t see one as push and one as toggle. Both are named toggle.


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

Share this post


Link to post
Share on other sites

yeah this is happening without disconnection of the USB. Here is the behavior in a video

 

Edited by john44111

Share this post


Link to post
Share on other sites

You don’t appear to be saving the assignments. You keep clicking cancel.


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

Share this post


Link to post
Share on other sites

I redid the video. It renamed both joysticks to "Push" again on it's own. If I rename them in the setup joysticks page or I edit the text file it changes the name but only temporarily.

in the first video That cancel is coming up when I click the other joystick to show you that what I do on one happens to the other. The cancel is canceling throwing out what I did.  I hit cancel to not get rid of my changes and I go up to save.

The funny thing is it is back to both saying push again.I didnt do anything.

Share this post


Link to post
Share on other sites

I tried rewriting the arduino and using a different model I made up in Boards.txt because I think Linda thinks they are the same arduino and I was going to change the name of the toggle one to something else but I learned the first lesson of Arduino code. Make sure you have backups because you cannot download the config off the device like you can with a Cisco Switch. The backup of the code I have, had a compile error that stopped it.  So chances are that wasnt the final version I uploaded 3 years ago.

 

Share this post


Link to post
Share on other sites

for those that come across this post by googling if it comes up where two arduinos keep acting like they are the same. 

 

I went off and spent the last 3 days taking 30 different youtube arduino courses to learn how to code that then I went and watched a few videos on the josystick library. My problem, which will be easily fixed with reflashing with a cleaned up config that I understand now, is this line

Joystick_ Joystick(JOYSTICK_DEFAULT_REPORT_ID, <-- This part was done in both arduinos. The problem with this is the arduino comes back with the exact same ID and then confuses programs it comes into contact with. Windows has no problem with it, Some programs dont think it is a different Arduino. I also flashed it as a Leonardo not a Micro Mini Arduino despite it being a mini micro. That was kind of funny it didnt error out on that.

Anyhow. The arduino isnt as hard as I thought by about course 5 I noticed a pattern in the coursework.

 

So here it is.

When you flash it you have to give it a different ID. not JOYSTICK_DEFAULT_REPORT_ID  That is why mine reports the same on both and gets confused.

Always save your code! I didnt. I thought you could pull off your code just like a Cisco Switch. Nope.. once you upload it it is compiled and put on the arduino. Near as I can tell zero ways to pull the config off.

Lesson learned.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...