-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathGenericPIDTest.java
45 lines (41 loc) · 1.04 KB
/
GenericPIDTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.neuronrobotics.test.nrdk;
import com.neuronrobotics.sdk.common.Log;
import com.neuronrobotics.sdk.network.BowlerTCPClient;
import com.neuronrobotics.sdk.pid.GenericPIDDevice;
// Auto-generated Javadoc
/**
* The Class GenericPIDTest.
*/
public class GenericPIDTest {
/**
* The main method.
*
* @param args the arguments
*/
public static void main(String[] args) {
Log.enableDebugPrint();
GenericPIDDevice pid = new GenericPIDDevice();
//if (!ConnectionDialog.getBowlerDevice(pid)){
// System.exit(1);
//}
try {
try {
pid.setConnection(new BowlerTCPClient("cortex.wpi.edu", 1965));
} catch (Exception e) {
// Auto-generated catch block
e.printStackTrace();
}
//pid.setConnection(new BowlerTCPClient("192.168.0.134", 1965));
pid.GetAllPIDPosition();
pid.GetPIDPosition(2);
pid.disconnect();
com.neuronrobotics.sdk.common.Log.error("All OK!");
System.exit(0);
} catch (Exception e) {
// Auto-generated catch block
e.printStackTrace();
pid.disconnect();
System.exit(1);
}
}
}