Ejemplo n.º 1
0
 public MyoManager()
 {
     myConnector = new ConnectorHub.ConnectorHub();
     myConnector.init();
     myFeedback = new ConnectorHub.FeedbackHub();
     myFeedback.init();
     myConnector.sendReady();
 }
Ejemplo n.º 2
0
        public MyoViewModel()
        {
            this.TimerStart = DateTime.Now;
            myConnector     = new ConnectorHub.ConnectorHub();
            myFeedback      = new ConnectorHub.FeedbackHub();
            myConnector.init();
            myFeedback.init();
            myConnector.sendReady();
            myConnector.startRecordingEvent  += MyConnector_startRecordingEvent;
            myConnector.stopRecordingEvent   += MyConnector_stopRecordingEvent;
            myFeedback.feedbackReceivedEvent += MyFeedback_feedbackReceivedEvent;

            myoManager.AccelerometerChanged += UpdateAccelerometer;
            myoManager.GyroscopeChanged     += UpdateGyroscope;
            myoManager.OrientationChanged   += UpdateOrientation;
            myoManager.EMGChanged           += UpdateEMG;

            setValueNames();
        }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();
            myoManager.InitMyoManagerHub(this);
            try
            {
                myConnector = new ConnectorHub.ConnectorHub();
                myConnector.init();
                myConnector.startRecordingEvent += MyConnector_startRecordingEvent;
                myConnector.stopRecordingEvent  += MyConnector_stopRecordingEvent;
                myConnector.sendReady();
                setValueNames();

                myFeedback = new ConnectorHub.FeedbackHub();
                myFeedback.init();
                myFeedback.feedbackReceivedEvent += MyFeedback_feedbackReceivedEvent;
            }
            catch (Exception e)
            {
            }
        }