Exemplo n.º 1
0
 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());
 }
Exemplo n.º 2
0
 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();
 }
Exemplo n.º 3
0
        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());
        }