Upgrade to Gradle 7.2 and WPILib 2022 (#316)

This commit is contained in:
Tyler Veness
2021-11-21 17:22:56 -08:00
committed by GitHub
parent ffe34f00fe
commit 5ca39e7f84
316 changed files with 671 additions and 1019 deletions

View File

@@ -14,12 +14,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.photonvision;
import edu.wpi.first.wpilibj.geometry.Rotation2d;
import edu.wpi.first.wpilibj.geometry.Transform2d;
import edu.wpi.first.wpilibj.geometry.Translation2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Transform2d;
import edu.wpi.first.math.geometry.Translation2d;
import java.util.ArrayList;
import java.util.List;
import org.junit.jupiter.api.Assertions;

View File

@@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.photonvision;
import org.junit.jupiter.api.Assertions;

View File

@@ -14,13 +14,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.photonvision;
import edu.wpi.first.wpilibj.geometry.Pose2d;
import edu.wpi.first.wpilibj.geometry.Rotation2d;
import edu.wpi.first.wpilibj.geometry.Transform2d;
import edu.wpi.first.wpilibj.util.Units;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Transform2d;
import edu.wpi.first.math.util.Units;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

View File

@@ -14,7 +14,6 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.photonvision;
import java.util.regex.Matcher;

View File

@@ -14,18 +14,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package org.photonvision;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import edu.wpi.first.wpilibj.geometry.Pose2d;
import edu.wpi.first.wpilibj.geometry.Rotation2d;
import edu.wpi.first.wpilibj.geometry.Transform2d;
import edu.wpi.first.wpilibj.geometry.Translation2d;
import edu.wpi.first.wpilibj.util.Units;
import edu.wpi.first.math.geometry.Pose2d;
import edu.wpi.first.math.geometry.Rotation2d;
import edu.wpi.first.math.geometry.Transform2d;
import edu.wpi.first.math.geometry.Translation2d;
import edu.wpi.first.math.util.Units;
import java.util.List;
import java.util.stream.Stream;
import org.junit.jupiter.api.Assertions;
@@ -214,7 +213,7 @@ class SimVisionSystemTest {
// If the camera is pitched down by 10 degrees, the target should appear
// in the upper part of the image (ie, pitch positive). Therefor,
// pass/fail involves -1.0.
assertEquals(tgt.getPitch(), -1.0 * testPitch, 0.0001);
assertEquals(tgt.getPitch(), -testPitch, 0.0001);
}
private static Stream<Arguments> distCalCParamProvider() {

View File

@@ -64,7 +64,7 @@ TEST_P(SimVisionSystemDistParamTest, DistanceAligned) {
.GetCameraRelativePose()
.Translation()
.Norm()
.to<double>(),
.value(),
dist);
}
@@ -294,7 +294,7 @@ TEST_P(SimVisionSystemCameraPitchParamTest, CameraPitch) {
// If the camera is pitched down by 10 degrees, the target should appear
// in the upper part of the image (ie, pitch positive). Therefor,
// pass/fail involves -1.0.
EXPECT_DOUBLE_EQ(tgt.GetPitch(), -1.0 * testPitch);
EXPECT_DOUBLE_EQ(tgt.GetPitch(), -testPitch);
}
class SimVisionSystemDistCalcParamTest
@@ -350,7 +350,7 @@ TEST_P(SimVisionSystemDistCalcParamTest, DistanceCalc) {
units::meter_t distMeas = photonlib::PhotonUtils::CalculateDistanceToTarget(
units::meter_t(testHeight), units::meter_t(testDist),
units::degree_t(testPitch), units::degree_t(tgt.GetPitch()));
EXPECT_DOUBLE_EQ(distMeas.to<double>(), testDist);
EXPECT_DOUBLE_EQ(distMeas.value(), testDist);
}
TEST(SimVisionSystemTest, MultipleTargets) {