public GroundControlCore(IntPtr handle) { XmlConfigurator.Configure(); logger = LogManager.GetLogger(""); logger.Info(new UAVCommons.Logging.ParameterLogEvent()); currentUAV = new UAV(); try { stick = new FlightControlCommons.UAVJoystick("Joystickunmapped", "", handle); stick.ConnectHardware(); currentUAV.uavData.Add(stick); mapping = new UAVCommons.UAVDataMapping("Joystick", "", stick); foreach (string key in stick.values.Keys) { if (!mapping.Mapping.ContainsKey(key)) { mapping.Mapping.Add(key, key); } } currentUAV.uavData.Add(mapping); } catch (Exception ex) { // currentUAV.WriteToLog("GroundLog","Error on Adding Joystick"); } // currentUAV.uavData.Add("Joystick", new FlightControlCommons.UAVJoystick("Joystick",0)); // currentUAV.uavData.Add("Keyboard", new FlightControlCommons.UAVKeyboard("Keyboard", 0)); }