/// <summary> /// Movinegmoter /// </summary> /// <returns>Finisih?</returns> public bool DriveParts() { bool returnvalue = false; nowTime = DateTime.UtcNow; myMotor1.Main(); myMotor2.Main(); befTime = nowTime; return(returnvalue); }
/// <summary> /// Movinegmoter /// </summary> /// <returns>Finisih?</returns> public bool DriveParts() { bool returnvalue = false; nowTime = DateTime.UtcNow; myMotor1.Main(); myMotor2.Main(); myMotor3.Main(); myMotor4.Main(); befTime = nowTime; if (myMotor1.finishFlg && myMotor2.finishFlg && myMotor3.finishFlg && myMotor4.finishFlg) { returnvalue = true; } return(returnvalue); }
public void Main(string argument, UpdateType updateSource) { // The main entry point of the script, invoked every time // one of the programmable block's Run actions are invoked, // or the script updates itself. The updateSource argument // describes where the update came from. Be aware that the // updateSource is a bitfield and might contain more than // one update type. // // The method itself is required, but the arguments above // can be removed if not needed. TimeSpan ts = motor.befTime - DateTime.UtcNow; this.Echo(ts.TotalMilliseconds.ToString()); motor.Main(); }
/// <summary> /// Movinegmoter /// </summary> /// <returns>Finisih?</returns> public bool DriveParts() { //bool returnvalue1 = false; //bool returnvalue2 = false; //bool returnvalue3 = false; bool returnvalue = false; nowTime = DateTime.UtcNow; myMotorKnee.Main(); myMotorThigh.Main(); myMotorAnkle.Main(); //if (justMove(myMotorKnee)) //{ // returnvalue1 = true; //} //if (fastMove(myMotorThigh)) //{ // returnvalue2 = true; //} //if (fastMove(myMotorAnkle)) //{ // returnvalue3 = true; //} //if (returnvalue1 && returnvalue2 && returnvalue3) //{ // returnvalue = true; //} befTime = nowTime; return(returnvalue); }