AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

How to do parsing from settings.json file?

Open haider04 opened this issue 8 years ago • 3 comments

Hi, I want to add a setting which can detect and can have inputs from 2 USB controllers (1 from steering wheel and 1 from pedals). For now, we have only "RemoteControlID" in RC settings which detects only 1 remote control ID. I want to add another "AuxRemoteControlID" which can take input from 2nd USB input controller. I have 2 questions in this regard:

  1. Where should i add the new settings? In AirSimSettings.hpp or where?
  2. How should i do the parsing of this new setting in the code? For example, in order to add another RC as "AuxRemoteControlID", where should i do the necessary code changes for parsing this new setting? Should i look for the function getRemoteControlID() in VehiclePawnWrapper.cpp or what other changes are required?

Any help/suggestions will be highly appreciated in this regard. Thanks!

Regards, Haider

haider04 avatar May 29 '18 17:05 haider04

Yes, this can be done. I would add AuxRemoteControlID in RC section of settings and then in vehicle detect if this is >= 0 and use it.

sytelus avatar Jun 23 '18 04:06 sytelus

Hi @haider04 -- Were you able to make progress on this or do you still need help?

bimalkmehta avatar Oct 01 '18 20:10 bimalkmehta

Internal VSTF 7430.

RVBldr avatar Nov 21 '18 17:11 RVBldr