mirror of
https://github.com/BotChain-Robots/ui.git
synced 2026-07-08 15:07:22 +02:00
Fully added gripper, distance, IMU, and display modules
This commit is contained in:
@@ -6,32 +6,12 @@ using UnityEngine.UI;
|
||||
|
||||
public class DCMotorModule : ModuleBase
|
||||
{
|
||||
private static DCMotorControlPanel motorControlPanel;
|
||||
private static ControlPanel motorControlPanel;
|
||||
public Transform motorShaft;
|
||||
|
||||
public float rotationSpeed = 90f;
|
||||
private float targetPosition = 0f;
|
||||
|
||||
public void Start()
|
||||
{
|
||||
if (motorControlPanel == null)
|
||||
{
|
||||
motorControlPanel = FindObjectOfType<DCMotorControlPanel>(true);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSelect()
|
||||
{
|
||||
if (motorControlPanel != null)
|
||||
motorControlPanel.Initialize(this);
|
||||
}
|
||||
|
||||
public override void DeSelect()
|
||||
{
|
||||
if (motorControlPanel != null)
|
||||
motorControlPanel.HidePanel();
|
||||
}
|
||||
|
||||
public void Rotate(float degrees, int direction)
|
||||
{
|
||||
float rotation = degrees * direction;
|
||||
|
||||
Reference in New Issue
Block a user