mirror of
https://github.com/Team4388/2019-Virtual-Field.git
synced 2026-06-09 08:38:05 -06:00
Configuration
This commit is contained in:
@@ -13,10 +13,9 @@ public class robotCommunication : MonoBehaviour
|
|||||||
public SortedList<string, float> robotValues =
|
public SortedList<string, float> robotValues =
|
||||||
new SortedList<string, float>
|
new SortedList<string, float>
|
||||||
{
|
{
|
||||||
{ "Pitch", 0.0f },
|
{ "Yaw Angle Deg", 0.0f },
|
||||||
{ "Roll", 0.0f },
|
|
||||||
{ "Yaw", 0.0f },
|
|
||||||
{ "Distance", 0.0f },
|
{ "Distance", 0.0f },
|
||||||
|
{ "Team", 0.0f },
|
||||||
};
|
};
|
||||||
public static int portNumber = 4388;
|
public static int portNumber = 4388;
|
||||||
public int bytesAvailable;
|
public int bytesAvailable;
|
||||||
|
|||||||
@@ -24,9 +24,9 @@ public class robotNavXControl : MonoBehaviour
|
|||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
float x = 0, y = 0, z = 0;
|
float x = 0, y = 0, z = 0;
|
||||||
roboCom.robotValues.TryGetValue("Pitch", out rot.x);
|
//roboCom.robotValues.TryGetValue("Pitch", out rot.x);
|
||||||
roboCom.robotValues.TryGetValue("Yaw", out rot.y);
|
roboCom.robotValues.TryGetValue("Yaw Angle Deg", out rot.y);
|
||||||
roboCom.robotValues.TryGetValue("Roll", out rot.z);
|
//roboCom.robotValues.TryGetValue("Roll", out rot.z);
|
||||||
roboCom.robotValues.TryGetValue("Distance", out distance);
|
roboCom.robotValues.TryGetValue("Distance", out distance);
|
||||||
rot.x *= -1;
|
rot.x *= -1;
|
||||||
rot.z *= -1;
|
rot.z *= -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user