public void StopDriveMotors() { if (ev3Plugin == null) { return; } ev3Plugin.Call("stopDriveMotors", LMotorPort.ToString(), LMotorPort.ToString()); }
public void StopDirectionMotor() { if (ev3Plugin == null) { return; } ev3Plugin.Call("stopDriveMotors", RMotorPort.ToString(), RMotorPort.ToString()); }
public void UpdateMotor() { switch (Port) { case OutputPort.A: Port = OutputPort.B; break; case OutputPort.B: Port = OutputPort.C; break; case OutputPort.C: Port = OutputPort.D; break; case OutputPort.D: Port = OutputPort.All; break; case OutputPort.All: Port = OutputPort.A; break; } MyText.text = Port.ToString(); switch (Motor) { case Motor.Left: EV3Manager.Instance.LMotorPort = Port; break; case Motor.Right: EV3Manager.Instance.RMotorPort = Port; break; case Motor.Spare: EV3Manager.Instance.SMotorPort = Port; break; } PlayerPrefs.SetString(Motor.ToString(), Port.ToString()); }
public string send() { string toSend = InputPort.ToString() + " " + InputLabel.ToString() + " " + OutputPort.ToString() + " "; foreach (int label in OutputLabel) { toSend += label + ","; } toSend = toSend.Remove(toSend.Length - 1, 1); toSend += " " + Index; return(toSend); }
public void StopDriveMotors() { ev3Plugin.Call("stopDriveMotors", LMotorPort.ToString(), RMotorPort.ToString()); }
void Start() { SetUpMotor(); MyText.text = Port.ToString(); }