public DolphiimoteWiimoteData(byte wiimoteNumber, WiimoteCalibration calibration)
        {
            fuser = new SimpleIntegrationMotionPlusFuser();
            WiimoteNumber = wiimoteNumber;
            this.calibration = calibration;

            MotionPlus = new Gyro(0, 0, 0);
            Acceleration = new Acceleration(0, 0, 0);
            Nunchuck = new Nunchuck
            {
                Acceleration = new Acceleration(0, 0, 0),
                Stick = new NunchuckStick(0, 0)
            };
        }
Esempio n. 2
0
        public DolphiimoteBridge(LogLevel logLevel, string logFile)
        {
            this.logFile = logFile;

            calibration = new WiimoteCalibration();
            dll = new DolphiimoteDll(Path.Combine(Environment.CurrentDirectory, "DolphiiMote.dll"));

            deferredEnables = new Queue<KeyValuePair<byte, WiimoteCapabilities>>();
            knownCapabilities = new Dictionary<byte, WiimoteCapabilities>();

            data = new Dictionary<uint, DolphiimoteWiimoteData>();

            for (byte i = 0; i < 4; i++)
                data[i] = new DolphiimoteWiimoteData(i, calibration);
        }
        public DolphiimoteWiimoteData(byte wiimoteNumber, WiimoteCalibration calibration, IMotionPlusFuser fuser)
        {
            WiimoteNumber = wiimoteNumber;

            this.calibration = calibration;
            this.fuser = fuser;

            MotionPlus = new CalibratedValue<Gyro>(false, new Gyro(0, 0, 0));
            Acceleration = new CalibratedValue<Acceleration>(false, new Acceleration(0, 0, 0));

            Nunchuck = new Nunchuck
            {
                Acceleration = new Acceleration(0, 0, 0),
                Stick = new NunchuckStick(0, 0)
            };
        }
        public DolphiimoteWiimoteData(byte wiimoteNumber, WiimoteCalibration calibration, IMotionPlusFuser fuser)
        {
            WiimoteNumber = wiimoteNumber;

            this.calibration = calibration;
            this.fuser       = fuser;

            MotionPlus   = new CalibratedValue <Gyro>(false, new Gyro(0, 0, 0));
            Acceleration = new CalibratedValue <Acceleration>(false, new Acceleration(0, 0, 0));

            Nunchuck = new Nunchuck
            {
                Acceleration = new Acceleration(0, 0, 0),
                Stick        = new NunchuckStick(0, 0)
            };
        }
        public DolphiimoteBridge(LogLevel logLevel, string logFile, Func <IMotionPlusFuser> fuserFactory)
        {
            this.logFile      = logFile;
            this.fuserFactory = fuserFactory;

            calibration = new WiimoteCalibration();
            dll         = new DolphiimoteDll(Path.Combine(Environment.CurrentDirectory, "DolphiiMote.dll"));

            deferredEnables   = new Queue <KeyValuePair <byte, WiimoteCapabilities> >();
            knownCapabilities = new Dictionary <byte, WiimoteCapabilities>();

            data = new Dictionary <uint, DolphiimoteWiimoteData>();

            for (byte i = 0; i < 4; i++)
            {
                data[i] = new DolphiimoteWiimoteData(i, calibration, fuserFactory());
            }
        }
Esempio n. 6
0
        public DolphiimoteWiimoteData(byte wiimoteNumber, WiimoteCalibration calibration, IMotionPlusFuser fuser)
        {
            WiimoteNumber = wiimoteNumber;

            this.calibration = calibration;
            this.fuser = fuser;

            MotionPlus = new CalibratedValue<Gyro>(false, new Gyro(0, 0, 0));
            Acceleration = new CalibratedValue<Acceleration>(false, new Acceleration(0, 0, 0));

            Nunchuck = new Nunchuck
            {
                Acceleration = new Acceleration(0, 0, 0),
                Stick = new AnalogStick(0, 0)
            };

            ClassicController = new ClassicController
            {
                LeftStick = new AnalogStick(0,0),
                RightStick = new AnalogStick(0,0),
                RightTrigger = new AnalogTrigger(0),
                LeftTrigger = new AnalogTrigger(0)
            };
        }
Esempio n. 7
0
        public DolphiimoteWiimoteData(byte wiimoteNumber, WiimoteCalibration calibration, IMotionPlusFuser fuser)
        {
            WiimoteNumber = wiimoteNumber;

            this.calibration = calibration;
            this.fuser       = fuser;

            MotionPlus   = new CalibratedValue <Gyro>(false, new Gyro(0, 0, 0));
            Acceleration = new CalibratedValue <Acceleration>(false, new Acceleration(0, 0, 0));

            Nunchuck = new Nunchuck
            {
                Acceleration = new Acceleration(0, 0, 0),
                Stick        = new AnalogStick(0, 0)
            };

            ClassicController = new ClassicController
            {
                LeftStick    = new AnalogStick(0, 0),
                RightStick   = new AnalogStick(0, 0),
                RightTrigger = new AnalogTrigger(0),
                LeftTrigger  = new AnalogTrigger(0)
            };

            Guitar = new Guitar
            {
                Stick  = new AnalogStick(0, 0),
                TapBar = new TapBar(0x0F),
                Whammy = new AnalogTrigger(0),
                IsGH3  = false
            };
            BalanceBoardSensor def = new BalanceBoardSensor
            {
                calibration = new BalanceBoardSensorCalibration
                {
                    kg00 = 0,
                    kg17 = 0,
                    kg34 = 0
                },
                kg  = 0,
                lb  = 0,
                raw = 0
            };

            BalanceBoard = new BalanceBoard
            {
                sensors = new BalanceBoardSensorList
                {
                    bottomLeft  = def,
                    bottomRight = def,
                    topLeft     = def,
                    topRight    = def
                },
                weight = new BalanceBoardWeight
                {
                    kg  = 0,
                    lb  = 0,
                    raw = 0
                },
                centerOfGravity = new AnalogStick(0, 0)
            };
            BatteryPercentage = 0;
        }