コード例 #1
0
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            //new bluetooth manager
            mConManager       = new btConManager();
            controllerManager = new btConManager();
            s = new StreamSocket();

            mflightbox = new flightbox(); // initialize a new flightbox


            //mflightbox.inclineEvent += fb_inclineEvent;

            mflightbox.motorEvent += mflightbox_motorEvent;


            mConManager.Initialize();
            controllerManager.Initialize();



            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(2);
            timer.Tick    += new EventHandler(timer_Tick);
            //timer.Start();
            mthrottle = 0;
            //Loaded += MainPage_Loaded;

            ReadData(SetupBluetoothLink());
            // controllerManager.MessageReceived += controllerManager_MessageReceived;
        }
コード例 #2
0
ファイル: MainPage.xaml.cs プロジェクト: peatear/equilibrium
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            //new bluetooth manager
            mConManager = new btConManager();

     
            mflightbox = new flightbox(); // initialize a new flightbox


            mflightbox.inclineEvent += fb_inclineEvent;
            
        }
コード例 #3
0
        // Constructor
        public ChatPage()
        {
            InitializeComponent();

            //SystemTray.SetProgressIndicator(this, new ProgressIndicator());

            this.DataContext = "Receivers";
            //init();
            motors = new float[4];

            //new bluetooth manager
            mConManager = new btConManager();


            mflightbox = new flightbox(); // initialize a new flightbox


            mflightbox.inclineEvent += fb_inclineEvent;

            //mflightbox.motorEvent += mflightbox_motorEvent;
            motion = new Motion();
            motion.TimeBetweenUpdates = TimeSpan.FromMilliseconds(5);
            motion.CurrentValueChanged += new EventHandler<SensorReadingEventArgs<MotionReading>>(motion_CurrentValueChanged);


            motion.Start();

            mConManager.Initialize();



            //timer = new DispatcherTimer();
            //timer.Interval = TimeSpan.FromSeconds(2);
            //timer.Tick += new EventHandler(timer_Tick);
            //timer.Start();
            mthrottle = 0;

        }