public override object CreateGlobal() { wiimoteBridge = new DolphiimoteBridge(logLevel, doLog ? "dolphiimote.log" : null, CreateMotionplusFuser); globalUpdators = new Dictionary <uint, Action>(); updatedWiimotes = new List <uint>(); return(Enumerable.Range(0, 4).Select(i => new WiimoteGlobal(this, wiimoteBridge.GetData((uint)i), globalUpdators)).ToArray()); }
public override object CreateGlobal() { wiimoteBridge = new DolphiimoteBridge(logLevel, doLog ? "dolphiimote.log" : null, CreateMotionplusFuser); globalUpdators = new Dictionary<uint, Action>(); updatedWiimotes = new List<uint>(); return Enumerable.Range(0, 4).Select(i => new WiimoteGlobal(this, wiimoteBridge.GetData((uint)i), globalUpdators)).ToArray(); }
public override object CreateGlobal() { string applicationDataSubPath = @"FreePIE\dolphiimote.log"; var applicationDataPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), applicationDataSubPath); var dolphiimoteLogPath = !Environment.CurrentDirectory.StartsWith(@"C:\Program Files (x86)\FreePIE") ? @"dolphiimote.log" : applicationDataPath; wiimoteBridge = new DolphiimoteBridge(logLevel, doLog ? dolphiimoteLogPath : null, CreateMotionplusFuser); globalUpdators = new Dictionary <uint, Action>(); globalUpdatorsCapabilities = new Dictionary <uint, Action>(); globalUpdatorsStatus = new Dictionary <uint, Action>(); updatedWiimotes = new List <uint>(); updatedWiimotesCapabilities = new List <uint>(); updatedWiimotesStatus = new List <uint>(); return(Enumerable.Range(0, 4).Select(i => new WiimoteGlobal(this, wiimoteBridge.GetData((uint)i), globalUpdators, globalUpdatorsCapabilities, globalUpdatorsStatus)).ToArray()); }