mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-22 01:11:40 +00:00
Reset network tables on camera rename
This commit is contained in:
@@ -91,6 +91,13 @@ public class VisionProcess {
|
||||
initNT(newTable);
|
||||
}
|
||||
|
||||
public void setCameraName(String newName) {
|
||||
var newTable = NetworkTableInstance.getDefault().getTable("/chameleon-vision/" + newName);
|
||||
resetNT(newTable);
|
||||
pipelineManager.renameCurrentPipeline(newName);
|
||||
pipelineManager.ntIndexEntry = ntPipelineEntry;
|
||||
}
|
||||
|
||||
private void initNT(NetworkTable newTable) {
|
||||
ntPipelineEntry = newTable.getEntry("pipeline");
|
||||
ntDriverModeEntry = newTable.getEntry("driver_mode");
|
||||
|
||||
Reference in New Issue
Block a user