Upgrade to 2027 alpha

This commit is contained in:
Gold856
2025-06-17 19:09:09 -04:00
committed by samfreund
parent 68bdb38a3d
commit ed1b31cb7f
28 changed files with 137 additions and 143 deletions

View File

@@ -24,7 +24,6 @@
package org.photonvision;
import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.math.MatBuilder;
import edu.wpi.first.math.Matrix;
@@ -176,8 +175,8 @@ public class PhotonCamera implements AutoCloseable {
new MultiSubscriber(
instance, new String[] {"/photonvision/"}, PubSubOption.topicsOnly(true));
HAL.report(tResourceType.kResourceType_PhotonCamera, InstanceCount);
InstanceCount++;
HAL.reportUsage("PhotonVision/PhotonCamera", InstanceCount, "");
// HACK - start a TimeSyncServer, if we haven't yet.
TimeSyncSingleton.load();

View File

@@ -26,7 +26,6 @@ package org.photonvision;
import edu.wpi.first.apriltag.AprilTagFieldLayout;
import edu.wpi.first.cscore.OpenCvLoader;
import edu.wpi.first.hal.FRCNetComm.tResourceType;
import edu.wpi.first.hal.HAL;
import edu.wpi.first.math.Matrix;
import edu.wpi.first.math.Pair;
@@ -184,8 +183,8 @@ public class PhotonPoseEstimator {
OpenCvLoader.forceStaticLoad();
}
HAL.report(tResourceType.kResourceType_PhotonPoseEstimator, InstanceCount);
InstanceCount++;
HAL.reportUsage("PhotonVision/PhotonPoseEstimator", InstanceCount, "");
}
/** Invalidates the pose cache. */

View File

@@ -166,8 +166,8 @@ PhotonCamera::PhotonCamera(nt::NetworkTableInstance instance,
frc::Alert::AlertType::kWarning),
timesyncAlert(PHOTON_ALERT_GROUP, "", frc::Alert::AlertType::kWarning) {
verifyDependencies();
HAL_Report(HALUsageReporting::kResourceType_PhotonCamera, InstanceCount);
InstanceCount++;
HAL_ReportUsage("PhotonVision/PhotonCamera", InstanceCount, "");
// The Robot class is actually created here:
// https://github.com/wpilibsuite/allwpilib/blob/811b1309683e930a1ce69fae818f943ff161b7a5/wpilibc/src/main/native/include/frc/RobotBase.h#L33

View File

@@ -86,9 +86,8 @@ PhotonPoseEstimator::PhotonPoseEstimator(frc::AprilTagFieldLayout tags,
referencePose(frc::Pose3d()),
poseCacheTimestamp(-1_s),
headingBuffer(frc::TimeInterpolatableBuffer<frc::Rotation2d>(1_s)) {
HAL_Report(HALUsageReporting::kResourceType_PhotonPoseEstimator,
InstanceCount);
InstanceCount++;
HAL_ReportUsage("PhotonVision/PhotonPoseEstimator", InstanceCount, "");
}
void PhotonPoseEstimator::SetMultiTagFallbackStrategy(PoseStrategy strategy) {

View File

@@ -253,14 +253,14 @@ class PhotonCameraTest {
if (i == coprocStart || i == coprocRestart) {
coprocNt.setServer("127.0.0.1", 5940);
coprocNt.startClient4("testClient");
coprocNt.startClient("testClient");
// PhotonCamera makes a server by default - connect to it
tspClient = new TimeSyncClient("127.0.0.1", 5810, 0.5);
}
if (i == robotStart || i == robotRestart) {
robotNt.startServer("networktables_random.json", "", 5941, 5940);
robotNt.startServer("networktables_random.json", "", 5940);
}
Thread.sleep(100);