Fix sim versionEntry NT table path (#569)

* Fix sim versionEntry NT table path

* Fix compile issue that mainTable is not accessible form SimPhotonCamera

* Fix format

Co-authored-by: Matt <matthew.morley.ca@gmail.com>
Co-authored-by: Chris Gerth <gerth2@users.noreply.github.com>
This commit is contained in:
Ethan Frank
2022-11-13 14:18:55 -05:00
committed by GitHub
parent c7aa84ca41
commit f193a2331a

View File

@@ -61,7 +61,9 @@ public class SimPhotonCamera extends PhotonCamera {
targetAreaEntry = rootTable.getEntry("targetAreaEntry");
targetSkewEntry = rootTable.getEntry("targetSkewEntry");
targetPoseEntry = rootTable.getEntry("targetPoseEntry");
versionEntry = rootTable.getEntry("versionEntry");
// The versionEntry is stored under the main table of <instance>/photonvision
versionEntry = instance.getTable("photonvision").getEntry("version");
// Sets the version string so that it will always match the current version
versionEntry.setString(PhotonVersion.versionString);