New 2018 and later build setup (#1001)

This commit is contained in:
Thad House
2018-04-29 13:29:07 -07:00
committed by Peter Johnson
parent cb2c9eb6d5
commit 7f88cf768d
317 changed files with 60521 additions and 54781 deletions

View File

@@ -44,6 +44,38 @@ public abstract class RobotBase {
// This is usually 1, but it is best to make sure
public static final long MAIN_THREAD_ID = Thread.currentThread().getId();
private static void setupCameraServerShared() {
CameraServerShared shared = new CameraServerShared() {
@Override
public void reportVideoServer(int id) {
HAL.report(tResourceType.kResourceType_PCVideoServer, id);
}
@Override
public void reportUsbCamera(int id) {
HAL.report(tResourceType.kResourceType_PCVideoServer, id);
}
@Override
public void reportDriverStationError(String error) {
DriverStation.reportError(error, true);
}
@Override
public void reportAxisCamera(int id) {
HAL.report(tResourceType.kResourceType_AxisCamera, id);
}
@Override
public Long getRobotMainThreadId() {
return MAIN_THREAD_ID;
}
};
CameraServerSharedStore.setCameraServerShared(shared);
}
protected final DriverStation m_ds;
/**
@@ -57,6 +89,7 @@ public abstract class RobotBase {
*/
protected RobotBase() {
NetworkTableInstance inst = NetworkTableInstance.getDefault();
setupCameraServerShared();
inst.setNetworkIdentity("Robot");
inst.startServer("/home/lvuser/networktables.ini");
m_ds = DriverStation.getInstance();