Configuration

This commit is contained in:
Keenan D. Buckley
2019-02-18 14:43:32 -07:00
parent 0b0347cdaa
commit 03da877147
2 changed files with 5 additions and 6 deletions
@@ -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;