コード例 #1
0
ファイル: main.cs プロジェクト: leuher/WeDo
        private void DriftMotor(Byte Port)
        {
            wclWeDoMotor Motor = GetMotor(Port);

            if (Motor != null)
            {
                Int32 Res = Motor.Drift();
                if (Res != wclErrors.WCL_E_SUCCESS)
                {
                    MessageBox.Show("Drift failed; 0x" + Res.ToString("X8"));
                }
            }
        }
コード例 #2
0
 private void btDrift2_Click(object sender, EventArgs e)
 {
     if (FMotor2 == null)
     {
         MessageBox.Show("Device is not attached");
     }
     else
     {
         Int32 Res = FMotor2.Drift();
         if (Res != wclErrors.WCL_E_SUCCESS)
         {
             MessageBox.Show("Drift failed; 0x" + Res.ToString("X8"));
         }
     }
 }