Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            myGlv        = new GloveVMG30_Wrapper();
            vmg30        = new VMG30();
            streaming    = new StreamingC(vmg30, myGlv);
            glv_feedback = new GlvFeedBackC(vmg30, myGlv);
            //myBinding.Source = myGlv.Thumb0[0];
            BindObjectToLabel(vmg30, "Thumb3[0]", xLabel_Thumb);
            BindObjectToLabel(vmg30, "Thumb3[1]", yLabel_Thumb);
            BindObjectToLabel(vmg30, "Thumb3[2]", zLabel_Thumb);
            BindObjectToLabel(vmg30, "Index3[0]", xLabel_Index);
            BindObjectToLabel(vmg30, "Index3[1]", yLabel_Index);
            BindObjectToLabel(vmg30, "Index3[2]", zLabel_Index);
            BindObjectToLabel(vmg30, "Middle3[0]", xLabel_Middle);
            BindObjectToLabel(vmg30, "Middle3[1]", yLabel_Middle);
            BindObjectToLabel(vmg30, "Middle3[2]", zLabel_Middle);
            BindObjectToLabel(vmg30, "Ring3[0]", xLabel_Ring);
            BindObjectToLabel(vmg30, "Ring3[1]", yLabel_Ring);
            BindObjectToLabel(vmg30, "Ring3[2]", zLabel_Ring);
            BindObjectToLabel(vmg30, "Little3[0]", xLabel_Little);
            BindObjectToLabel(vmg30, "Little3[1]", yLabel_Little);
            BindObjectToLabel(vmg30, "Little3[2]", zLabel_Little);
            //binding the finger's bending values to the wpf elements
            BindObjectToLabel(vmg30, "FingerBend[0]", FB1Label_Thumb);
            BindObjectToLabel(vmg30, "FingerBend[1]", FB2Label_Thumb);
            BindObjectToLabel(vmg30, "FingerBend[2]", FB1Label_Index);
            BindObjectToLabel(vmg30, "FingerBend[3]", FB2Label_Index);
            BindObjectToLabel(vmg30, "FingerBend[4]", FB1Label_Middle);
            BindObjectToLabel(vmg30, "FingerBend[5]", FB2Label_Middle);
            BindObjectToLabel(vmg30, "FingerBend[6]", FB1Label_Ring);
            BindObjectToLabel(vmg30, "FingerBend[7]", FB2Label_Ring);
            BindObjectToLabel(vmg30, "FingerBend[8]", FB1Label_Little);
            BindObjectToLabel(vmg30, "FingerBend[9]", FB2Label_Little);
            //binding the finger's abduction valus to the wpf elements
            BindObjectToLabel(vmg30, "FingerAbd[0]", FABD1Label);
            BindObjectToLabel(vmg30, "FingerAbd[1]", FABD2Label);
            BindObjectToLabel(vmg30, "FingerAbd[2]", FABD3Label);
            BindObjectToLabel(vmg30, "FingerAbd[3]", FABD4Label);
            //binding the ThumbCO and PalmArch values to the wpf elements
            BindObjectToLabel(vmg30, "ThumbCO", ThumbCOLabel);
            BindObjectToLabel(vmg30, "PalmArch", PalmArchLabel);
            //binding the roll,pitch,yaw hand and wrist valus to the wpf elements
            BindObjectToLabel(vmg30, "RPY_Wrist[0]", RollLabel_Wrist);
            BindObjectToLabel(vmg30, "RPY_Wrist[1]", PitchLabel_Wrist);
            BindObjectToLabel(vmg30, "RPY_Wrist[2]", YawLabel_Wrist);
            BindObjectToLabel(vmg30, "RPY_Hand[0]", RollLabel_Hand);
            BindObjectToLabel(vmg30, "RPY_Hand[1]", PitchLabel_Hand);
            BindObjectToLabel(vmg30, "RPY_Hand[2]", YawLabel_Hand);
            //binding the finger tip's pressure values to the wpf elements
            BindObjectToLabel(vmg30, "Press[0]", PressLabel_Thumb);
            BindObjectToLabel(vmg30, "Press[1]", PressLabel_Index);
            BindObjectToLabel(vmg30, "Press[2]", PressLabel_Middle);
            BindObjectToLabel(vmg30, "Press[3]", PressLabel_Ring);
            BindObjectToLabel(vmg30, "Press[4]", PressLabel_Little);
            //binding the finger feedback values from the vibration motors
            BindObjectToTextBox(vmg30, "FingerFeedBackVal[0]", ThumbVal);
            BindObjectToTextBox(vmg30, "FingerFeedBackVal[1]", IndexVal);
            BindObjectToTextBox(vmg30, "FingerFeedBackVal[2]", MiddleVal);
            BindObjectToTextBox(vmg30, "FingerFeedBackVal[3]", RingVal);
            BindObjectToTextBox(vmg30, "FingerFeedBackVal[4]", LittleVal);

            //overwrite to ensure correct state
            SchunkCOMConnect_Btn.Content = "Connect";
        }
Esempio n. 2
0
 public StreamingC(VMG30 vmg30, GloveVMG30_Wrapper myGlv)
 {
     this.vmg30 = vmg30;
     this.myGlv = myGlv;
 }
Esempio n. 3
0
 public GlvFeedBackC(VMG30 vmg30, GloveVMG30_Wrapper myGlv)
 {
     this.vmg30 = vmg30;
     this.myGlv = myGlv;
 }