Merge "Add statistics and filter outliers in mapping"
diff --git a/WORKSPACE b/WORKSPACE
index d2f8639..9c4718b 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -234,14 +234,14 @@
generate_repositories_for_debs(
gstreamer_amd64_debs,
- base_url = "https://www.frc971.org/Build-Dependencies/gstreamer_bullseye_amd64_deps",
+ base_url = "https://software.frc971.org/Build-Dependencies/gstreamer_bullseye_amd64_deps",
)
generate_repositories_for_debs(gstreamer_armhf_debs)
generate_repositories_for_debs(
gstreamer_arm64_debs,
- base_url = "https://www.frc971.org/Build-Dependencies/gstreamer_bullseye_arm64_deps",
+ base_url = "https://software.frc971.org/Build-Dependencies/gstreamer_bullseye_arm64_deps",
)
generate_repositories_for_debs(m4_debs)
@@ -412,7 +412,7 @@
patches = ["//debian:nlopt.patch"],
sha256 = "2d65815b21c30813499fe19c63947f7da56b10c0d4a459dce05417899b43e461",
strip_prefix = "nlopt-496be736b8b249273838b891f4c8ca3669551127",
- url = "https://www.frc971.org/Build-Dependencies/nlopt-496be736b8b249273838b891f4c8ca3669551127.zip",
+ url = "https://software.frc971.org/Build-Dependencies/nlopt-496be736b8b249273838b891f4c8ca3669551127.zip",
)
http_archive(
@@ -465,7 +465,7 @@
patches = ["//debian:boringssl.patch"],
sha256 = "bcab08a22c28f5322316542aa2c3a9ef0a9f9fde9be22d489cee574867b24675",
strip_prefix = "boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413",
- urls = ["https://www.frc971.org/Build-Dependencies/boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413.zip"],
+ urls = ["https://software.frc971.org/Build-Dependencies/boringssl-613fe9dbe74b58d6aaaf0d22fe57dccd964c7413.zip"],
)
# C++ rules for Bazel.
@@ -474,7 +474,7 @@
sha256 = "ed36cc7a6f46b7c28ab4009db4a37e350e1ba367446b0886bcc9cdc1df92752e",
strip_prefix = "rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab",
urls = [
- "https://www.frc971.org/Build-Dependencies/rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab.zip",
+ "https://software.frc971.org/Build-Dependencies/rules_cc-608c7b605fb844a20e96a3eddc9b49ad2542adab.zip",
],
)
@@ -498,7 +498,7 @@
patches = ["//debian:fts.patch"],
sha256 = "f53c6b86c25b4827d50365efe760a08edfea39c027dd08674ae696c9093d6a37",
strip_prefix = "roborio-academic",
- url = "https://www.frc971.org/Build-Dependencies/cortexa9_vfpv3-roborio-academic-2023-x86_64-linux-gnu-Toolchain-12.1.0.tgz",
+ url = "https://software.frc971.org/Build-Dependencies/cortexa9_vfpv3-roborio-academic-2023-x86_64-linux-gnu-Toolchain-12.1.0.tgz",
)
# The main partition from https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-lite.zip.sig
@@ -509,7 +509,7 @@
name = "armhf_debian_rootfs",
build_file = "@//:compilers/debian_rootfs.BUILD",
sha256 = "734f26a0cfc943cc3cae88412536186adfc4ed148cc167e6ffb298497c686280",
- url = "https://www.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-armhf-lite_rootfs.tar.bz2",
+ url = "https://software.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-armhf-lite_rootfs.tar.bz2",
)
# The main partition from https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2021-11-08/2021-10-30-raspios-bullseye-armhf-lite.zip.sig
@@ -520,7 +520,7 @@
name = "arm64_debian_rootfs",
build_file = "@//:compilers/debian_rootfs.BUILD",
sha256 = "7e6ad432fec0a36f8b66c3fc2ab8795ea446e61f7dce7a206b55602677cf0904",
- url = "https://www.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-arm64-lite_rootfs.tar.bz2",
+ url = "https://software.frc971.org/Build-Dependencies/2021-10-30-raspios-bullseye-arm64-lite_rootfs.tar.bz2",
)
# Created with:
@@ -533,7 +533,7 @@
name = "amd64_debian_sysroot",
build_file = "@//:compilers/debian_rootfs.BUILD",
sha256 = "5e10f4cac85a98a39da1716b218bc05fff4666c61cc471a7df27876710bc86d2",
- url = "https://www.frc971.org/Build-Dependencies/2022-01-06-debian-bullseye_rootfs.tar.bz2",
+ url = "https://software.frc971.org/Build-Dependencies/2022-01-06-debian-bullseye_rootfs.tar.bz2",
)
local_repository(
@@ -577,14 +577,14 @@
visibility = ["//visibility:public"],
)""",
sha256 = "5312c79b19e9883b3cebd9d65b4438a2bf05b41da0bcd8c35e19d22c3b2e1859",
- urls = ["https://www.frc971.org/Build-Dependencies/test_image_frc971.vision.CameraImage_2023.01.28.tar.gz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/test_image_frc971.vision.CameraImage_2023.01.28.tar.gz"],
)
http_file(
name = "game_pieces_edgetpu_model",
downloaded_file_path = "edgetpu_model.tflite",
sha256 = "3d37f34805d017153064076519aaf4b532658a3b8f2518bce8787f27a5c3064c",
- urls = ["https://www.frc971.org/Build-Dependencies/models/2023/model_edgetpu_2023.04.09_3.tflite"],
+ urls = ["https://software.frc971.org/Build-Dependencies/models/2023/model_edgetpu_2023.04.09_3.tflite"],
)
# Recompressed from libusb-1.0.21.7z.
@@ -592,7 +592,7 @@
name = "libusb_1_0_windows",
downloaded_file_path = "libusb-1.0.21-windows.tar.xz",
sha256 = "fc2ba03992f343aabbaf9eb90559c6e00cdc6a2bd914d7cebea85857d5244015",
- urls = ["https://www.frc971.org/Build-Dependencies/libusb-1.0.21-windows.tar.xz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/libusb-1.0.21-windows.tar.xz"],
)
# The data tarball of the same-named Debian package.
@@ -600,7 +600,7 @@
name = "f2c",
build_file = "@//debian:f2c.BUILD",
sha256 = "2c677437f8217a2e2b23e41b33995d0571644fc1bea46de858f8913a5053e3f4",
- url = "https://www.frc971.org/Build-Dependencies/f2c_20100827-1_amd64.xz.tar.xz",
+ url = "https://software.frc971.org/Build-Dependencies/f2c_20100827-1_amd64.xz.tar.xz",
)
# Downloaded from http://www.netlib.org/clapack/.
@@ -609,28 +609,28 @@
build_file = "@//debian:clapack.BUILD",
sha256 = "6dc4c382164beec8aaed8fd2acc36ad24232c406eda6db462bd4c41d5e455fac",
strip_prefix = "CLAPACK-3.2.1/",
- url = "https://www.frc971.org/Build-Dependencies/clapack-3.2.1.tgz",
+ url = "https://software.frc971.org/Build-Dependencies/clapack-3.2.1.tgz",
)
http_archive(
name = "postgresql_amd64",
build_file = "@//debian:postgresql_amd64.BUILD",
sha256 = "483e199d0e7feae7cca0df132c649b5c20ddcc1a17760e656c25709f44f57a65",
- url = "https://www.frc971.org/Build-Dependencies/postgresql_amd64_v2.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/postgresql_amd64_v2.tar.gz",
)
http_archive(
name = "patch",
build_file = "@//debian:patch.BUILD",
sha256 = "b5ce139648a2e04f5585948ddad2fdae24dd4ee7976ac5a22d6ae7bd5674631e",
- url = "https://www.frc971.org/Build-Dependencies/patch.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/patch.tar.gz",
)
http_archive(
name = "rsync",
build_file = "@//debian:rsync.BUILD",
sha256 = "53be65a9214aaa6d1b9176f135184fb4a78ccefd58f95ce0da37e6a392dfeb60",
- url = "https://www.frc971.org/Build-Dependencies/rsync.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/rsync.tar.gz",
)
# //debian:ssh
@@ -638,56 +638,56 @@
name = "ssh",
build_file = "@//debian:ssh.BUILD",
sha256 = "470fdc1252a2133a9d3c3da778e892a5b88f04f402cb04d8eb1cff7853242034",
- url = "https://www.frc971.org/Build-Dependencies/ssh_v3.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/ssh_v3.tar.gz",
)
http_archive(
name = "apache2",
build_file = "@//debian:apache2.BUILD",
sha256 = "98b0ad6d911751ba0aa486429e6278f995e7bbabd928c7d3d44c888fa2bf371b",
- url = "https://www.frc971.org/Build-Dependencies/apache2.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/apache2.tar.gz",
)
http_archive(
name = "pandoc",
build_file = "@//debian:pandoc.BUILD",
sha256 = "9f7a7adb3974a1f14715054c349ff3edc2909e920dbe3438fca437a83845f3c4",
- url = "https://www.frc971.org/Build-Dependencies/pandoc.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/pandoc.tar.gz",
)
http_archive(
name = "libusb",
build_file = "@//debian:libusb.BUILD",
sha256 = "3ca5cc2d317226f6646866ff9e8c443db3b0f6c82f828e800240982727531590",
- url = "https://www.frc971.org/Build-Dependencies/libusb.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/libusb.tar.gz",
)
http_archive(
name = "mingw_compiler",
build_file = "@//debian:mingw_compiler.BUILD",
sha256 = "45e86a8460f2151a4f0306e7ae7b06761029d2412ee16f63d1e8d2d29354e378",
- url = "https://www.frc971.org/Build-Dependencies/mingw_compiler.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/mingw_compiler.tar.gz",
)
http_archive(
name = "patchelf",
build_file = "@//debian:patchelf.BUILD",
sha256 = "bf8b709909d7d9e30815dd228eeded7dc282e3ce3919d0589ccbb56ac8632abc",
- url = "https://www.frc971.org/Build-Dependencies/patchelf.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/patchelf.tar.gz",
)
http_archive(
name = "arm_frc_gnueabi_deps",
build_file = "@//debian:arm_frc_gnueabi_deps.BUILD",
sha256 = "4b26fe45010817dc136488ee1604ade21bd7c264c29f17d864fc6eba9d7442c4",
- url = "https://www.frc971.org/Build-Dependencies/arm_frc_gnueabi_deps.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/arm_frc_gnueabi_deps.tar.gz",
)
http_archive(
name = "gtk_runtime",
build_file = "@//debian:gtk_runtime.BUILD",
sha256 = "5a6014d1783363be6bc95843d03bbb6513e650eaea60be2b1a4c65bf21981f9b",
- url = "https://www.frc971.org/Build-Dependencies/gtk_runtime-4.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/gtk_runtime-4.tar.gz",
)
# Downloaded from
@@ -697,7 +697,7 @@
build_file = "@//:compilers/gcc_arm_none_eabi.BUILD",
sha256 = "bb17109f0ee697254a5d4ae6e5e01440e3ea8f0277f2e8169bf95d07c7d5fe69",
strip_prefix = "gcc-arm-none-eabi-7-2018-q2-update/",
- url = "https://www.frc971.org/Build-Dependencies/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2",
+ url = "https://software.frc971.org/Build-Dependencies/gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2",
)
# Java11 JDK.
@@ -711,7 +711,7 @@
"@platforms//os:linux",
],
urls = [
- "https://www.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_x64.tar.gz",
+ "https://software.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_x64.tar.gz",
],
version = "11",
)
@@ -726,7 +726,7 @@
"@platforms//os:linux",
],
urls = [
- "https://www.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_aarch64.tar.gz",
+ "https://software.frc971.org/Build-Dependencies/zulu11.54.25-ca-jdk11.0.14.1-linux_aarch64.tar.gz",
],
version = "11",
)
@@ -1138,8 +1138,8 @@
"aarch64-unknown-linux-gnu",
],
register_toolchain = False,
- rustfmt_version = "1.62.0",
- version = "1.62.0",
+ rustfmt_version = "1.70.0",
+ version = "1.70.0",
)
# Flatbuffers
@@ -1152,7 +1152,7 @@
name = "sample_logfile",
downloaded_file_path = "log.fbs",
sha256 = "45d1d19fb82786c476d3f21a8d62742abaeeedf4c16a00ec37ae350dcb61f1fc",
- urls = ["https://www.frc971.org/Build-Dependencies/small_sample_logfile2.fbs"],
+ urls = ["https://software.frc971.org/Build-Dependencies/small_sample_logfile2.fbs"],
)
http_archive(
@@ -1165,7 +1165,7 @@
)
""",
sha256 = "115dcd2fe005cb9cad3325707aa7f4466390c43a08555edf331c06c108bdf692",
- url = "https://www.frc971.org/Build-Dependencies/2021-03-20_drivetrain_spin_wheels.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/2021-03-20_drivetrain_spin_wheels.tar.gz",
)
http_archive(
@@ -1178,7 +1178,7 @@
)
""",
sha256 = "2b9a3ecc83f2aba89a1909ae38fe51e6718a5b4d0e7c131846dfb2845df9cd19",
- url = "https://www.frc971.org/Build-Dependencies/2021-10-03_superstructure_shoot_balls.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/2021-10-03_superstructure_shoot_balls.tar.gz",
)
# OpenCV arm64 (for raspberry pi)
@@ -1186,7 +1186,7 @@
name = "opencv_arm64",
build_file = "@//debian:opencv.BUILD",
sha256 = "d284fae46ca710cf24c81ff7ace34929773466bff38f365a80371bea3b36a2ed",
- url = "https://www.frc971.org/Build-Dependencies/opencv_arm64.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/opencv_arm64.tar.gz",
)
# OpenCV armhf (for raspberry pi)
@@ -1194,14 +1194,14 @@
name = "opencv_armhf",
build_file = "@//debian:opencv.BUILD",
sha256 = "064165507bad1afa8f7b22961a9a9067b243abc70064d713d26b37bc8dc2bf56",
- url = "https://www.frc971.org/Build-Dependencies/opencv_armhf_v4.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/opencv_armhf_v4.tar.gz",
)
http_archive(
name = "opencv_k8",
build_file = "@//debian:opencv.BUILD",
sha256 = "1d8f839fd135a700ca0576a503b15b0a198fef5b36f22efae5cae9eaa17935d1",
- url = "https://www.frc971.org/Build-Dependencies/opencv_amd64_v4.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/opencv_amd64_v4.tar.gz",
)
http_archive(
@@ -1232,21 +1232,21 @@
name = "gstreamer_k8",
build_file = "@//debian:gstreamer.BUILD",
sha256 = "09765cb1dd8abc643cb1dd91d536aef3e6604ff05f5f92898d508ed857455d0b",
- url = "https://www.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_amd64_v2.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_amd64_v2.tar.gz",
)
http_archive(
name = "gstreamer_armhf",
build_file = "@//debian:gstreamer.BUILD",
sha256 = "c5ac4c604952c274a50636e244f0d091bd1de302032446f24f0e9e03ae9c76f7",
- url = "https://www.frc971.org/Build-Dependencies/gstreamer_armhf.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/gstreamer_armhf.tar.gz",
)
http_archive(
name = "gstreamer_arm64",
build_file = "@//debian:gstreamer.BUILD",
sha256 = "42b414c565ffdbae3d2d7796a66da9de42a650de757fa6554fd624f0cc3aaa9b",
- url = "https://www.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_arm64.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/gstreamer_1.20.1-1~bpo11+1_arm64.tar.gz",
)
# //debian:lzma_amd64
@@ -1267,7 +1267,7 @@
)
""",
sha256 = "6fa0ad579b78bd41a0133024c34063b140442dd2ad4201fd2bf4c55229e7c13f",
- urls = ["https://www.frc971.org/Build-Dependencies/lzma_amd64-2.tar.gz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/lzma_amd64-2.tar.gz"],
)
# //debian:lzma_arm64
@@ -1288,7 +1288,7 @@
)
""",
sha256 = "b4ab9fd7cf3bfdb9e3fc67ac4a3c84db7f7e3c48431ccfc6e6e210f5829d17c9",
- urls = ["https://www.frc971.org/Build-Dependencies/lzma_arm64-2.tar.gz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/lzma_arm64-2.tar.gz"],
)
local_repository(
@@ -1365,7 +1365,7 @@
""",
patch_cmds = ["touch lib/x86_64-linux-gnu/BUILD"],
sha256 = "059e14f77dce365c57b96284aae98c892f61e269b3fbb7d07714b7135c2e5617",
- urls = ["https://www.frc971.org/Build-Dependencies/libtinfo5_amd64.tar.gz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/libtinfo5_amd64.tar.gz"],
)
http_archive(
@@ -1381,7 +1381,7 @@
""",
patch_cmds = ["touch lib/aarch64-linux-gnu/BUILD"],
sha256 = "df4ea5194c80df8d1f5f6ed68b47ce9dbf78aa8cdebbc61cf00654d9075f8e3c",
- urls = ["https://www.frc971.org/Build-Dependencies/libtinfo5_arm64.tar.gz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/libtinfo5_arm64.tar.gz"],
)
http_archive(
@@ -1391,7 +1391,7 @@
"unlink usr/bin/X11",
],
sha256 = "a7491bf6c47ed0037992fa493f9c25af3ab00a695d706e1fdc122a8b798c0d7c",
- urls = ["https://www.frc971.org/Build-Dependencies/xvfb_amd64.tar.gz"],
+ urls = ["https://software.frc971.org/Build-Dependencies/xvfb_amd64.tar.gz"],
)
local_repository(
@@ -1405,7 +1405,7 @@
build_file = "//debian:curl.BUILD",
sha256 = "01ae0c123dee45b01bbaef94c0bc00ed2aec89cb2ee0fd598e0d302a6b5e0a98",
strip_prefix = "curl-7.69.1",
- url = "https://www.frc971.org/Build-Dependencies/curl-7.69.1.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/curl-7.69.1.tar.gz",
)
http_archive(
@@ -1431,7 +1431,7 @@
patch_args = ["-p1"],
patches = ["//debian:aws_sdk.patch"],
sha256 = "de6570d10c246189fd8c02100f7f0d9af8499a3ef94a131eeb85619f3bd6c604",
- url = "https://www.frc971.org/Build-Dependencies/aws_sdk-1.10.34.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/aws_sdk-1.10.34.tar.gz",
)
# Source code of LZ4 (files under lib/) are under BSD 2-Clause.
@@ -1544,7 +1544,7 @@
)""",
sha256 = "629b150e4c71679e1ac30b8a2dfa558a04bbcca7ad0edd61bd6878d3b243edb6",
url =
- "https://www.frc971.org/Build-Dependencies/foxglove-d6b00825.tar.gz",
+ "https://software.frc971.org/Build-Dependencies/foxglove-d6b00825.tar.gz",
)
#
@@ -1556,7 +1556,7 @@
patches = ["//third_party/vl53l1x:vl53l1x.patch"],
sha256 = "06a66254ab7a8b061f93ff0f65abb6088c3ea50335475bb6ac11087beb65d174",
strip_prefix = "en.STSW-IMG009_v3.5.2/API",
- url = "https://www.frc971.org/Build-Dependencies/en.STSW-IMG009.zip",
+ url = "https://software.frc971.org/Build-Dependencies/en.STSW-IMG009.zip",
)
http_archive(
@@ -1568,7 +1568,7 @@
visibility = ["//visibility:public"],
)""",
sha256 = "2356b9d0b3be59d01e837bfbbee21de55b16232d5e00c66701c20b64ff3272e3",
- url = "https://www.frc971.org/Build-Dependencies/2023_arducam_apriltag_test_images.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/2023_arducam_apriltag_test_images.tar.gz",
)
http_archive(
@@ -1576,7 +1576,7 @@
build_file = "//third_party:libedgetpu/libedgetpu.BUILD",
sha256 = "c900faf2c9ea9599fda60c3d03ac43d0d7b34119659c9e35638b81cd14354b57",
strip_prefix = "libedgetpu-bazel",
- url = "https://www.frc971.org/Build-Dependencies/libedgetpu-ddfa7bde33c23afd8c2892182faa3e5b4e6ad94e.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/libedgetpu-ddfa7bde33c23afd8c2892182faa3e5b4e6ad94e.tar.gz",
)
http_archive(
@@ -1584,7 +1584,7 @@
build_file = "//third_party:libtensorflowlite/libtensorflowlite.BUILD",
sha256 = "a073dfddb3cb25113ba7eac6edb5569d0ae7988cad881d3f665e8ca0b8b85108",
strip_prefix = "tensorflow-bazel",
- url = "https://www.frc971.org/Build-Dependencies/tensorflow-a4dfb8d1a71385bd6d122e4f27f86dcebb96712d.tar.gz",
+ url = "https://software.frc971.org/Build-Dependencies/tensorflow-a4dfb8d1a71385bd6d122e4f27f86dcebb96712d.tar.gz",
)
http_archive(
diff --git a/aos/events/event_loop_param_test.cc.rej b/aos/events/event_loop_param_test.cc.rej
deleted file mode 100644
index c03b83d..0000000
--- a/aos/events/event_loop_param_test.cc.rej
+++ /dev/null
@@ -1,300 +0,0 @@
-diff a/aos/events/event_loop_param_test.cc b/aos/events/event_loop_param_test.cc (rejected hunks)
-@@ -1923,6 +1923,298 @@
- EXPECT_GT(expected_times[expected_times.size() / 2], average_time - kEpsilon);
- }
-
-+// Tests that a phased loop responds correctly to a changing offset; sweep
-+// across a variety of potential offset changes, to ensure that we are
-+// exercising a variety of potential cases.
-+TEST_P(AbstractEventLoopTest, PhasedLoopChangingOffsetSweep) {
-+ const chrono::milliseconds kInterval = chrono::milliseconds(1000);
-+ const int kCount = 5;
-+
-+ auto loop1 = MakePrimary();
-+
-+ std::vector<aos::monotonic_clock::duration> offset_options;
-+ for (int ii = 0; ii < kCount; ++ii) {
-+ offset_options.push_back(ii * kInterval / kCount);
-+ }
-+ std::vector<aos::monotonic_clock::duration> offset_sweep;
-+ // Run over all the pair-wise combinations of offsets.
-+ for (int ii = 0; ii < kCount; ++ii) {
-+ for (int jj = 0; jj < kCount; ++jj) {
-+ offset_sweep.push_back(offset_options.at(ii));
-+ offset_sweep.push_back(offset_options.at(jj));
-+ }
-+ }
-+
-+ std::vector<::aos::monotonic_clock::time_point> expected_times;
-+
-+ PhasedLoopHandler *phased_loop;
-+
-+ // Run kCount iterations.
-+ int counter = 0;
-+ phased_loop = loop1->AddPhasedLoop(
-+ [&phased_loop, &expected_times, &loop1, this, kInterval, &counter,
-+ offset_sweep](int count) {
-+ EXPECT_EQ(count, 1);
-+ expected_times.push_back(loop1->context().monotonic_event_time);
-+
-+ counter++;
-+
-+ if (counter == offset_sweep.size()) {
-+ LOG(INFO) << "Exiting";
-+ this->Exit();
-+ return;
-+ }
-+
-+ phased_loop->set_interval_and_offset(kInterval,
-+ offset_sweep.at(counter));
-+ },
-+ kInterval, offset_sweep.at(0));
-+
-+ Run();
-+ ASSERT_EQ(expected_times.size(), offset_sweep.size());
-+ for (size_t ii = 1; ii < expected_times.size(); ++ii) {
-+ EXPECT_LE(expected_times.at(ii) - expected_times.at(ii - 1), kInterval);
-+ }
-+}
-+
-+// Tests that a phased loop responds correctly to being rescheduled with now
-+// equal to a time in the past.
-+TEST_P(AbstractEventLoopTest, PhasedLoopRescheduleInPast) {
-+ const chrono::milliseconds kOffset = chrono::milliseconds(400);
-+ const chrono::milliseconds kInterval = chrono::milliseconds(1000);
-+
-+ auto loop1 = MakePrimary();
-+
-+ std::vector<::aos::monotonic_clock::time_point> expected_times;
-+
-+ PhasedLoopHandler *phased_loop;
-+
-+ int expected_count = 1;
-+
-+ // Set up a timer that will get run immediately after the phased loop and
-+ // which will attempt to reschedule the phased loop to just before now. This
-+ // should succeed, but will result in 0 cycles elapsing.
-+ TimerHandler *manager_timer =
-+ loop1->AddTimer([&phased_loop, &loop1, &expected_count, this]() {
-+ if (expected_count == 0) {
-+ LOG(INFO) << "Exiting";
-+ this->Exit();
-+ return;
-+ }
-+ phased_loop->Reschedule(loop1->context().monotonic_event_time -
-+ std::chrono::nanoseconds(1));
-+ expected_count = 0;
-+ });
-+
-+ phased_loop = loop1->AddPhasedLoop(
-+ [&expected_count, &expected_times, &loop1, manager_timer](int count) {
-+ EXPECT_EQ(count, expected_count);
-+ expected_times.push_back(loop1->context().monotonic_event_time);
-+
-+ manager_timer->Setup(loop1->context().monotonic_event_time);
-+ },
-+ kInterval, kOffset);
-+ phased_loop->set_name("Test loop");
-+ manager_timer->set_name("Manager timer");
-+
-+ Run();
-+
-+ ASSERT_EQ(2u, expected_times.size());
-+ ASSERT_EQ(expected_times[0], expected_times[1]);
-+}
-+
-+// Tests that a phased loop responds correctly to being rescheduled at the time
-+// when it should be triggering (it should kick the trigger to the next cycle).
-+TEST_P(AbstractEventLoopTest, PhasedLoopRescheduleNow) {
-+ const chrono::milliseconds kOffset = chrono::milliseconds(400);
-+ const chrono::milliseconds kInterval = chrono::milliseconds(1000);
-+
-+ auto loop1 = MakePrimary();
-+
-+ std::vector<::aos::monotonic_clock::time_point> expected_times;
-+
-+ PhasedLoopHandler *phased_loop;
-+
-+ bool should_exit = false;
-+ // Set up a timer that will get run immediately after the phased loop and
-+ // which will attempt to reschedule the phased loop to now. This should
-+ // succeed, but will result in no change to the expected behavior (since this
-+ // is the same thing that is actually done internally).
-+ TimerHandler *manager_timer =
-+ loop1->AddTimer([&phased_loop, &loop1, &should_exit, this]() {
-+ if (should_exit) {
-+ LOG(INFO) << "Exiting";
-+ this->Exit();
-+ return;
-+ }
-+ phased_loop->Reschedule(loop1->context().monotonic_event_time);
-+ should_exit = true;
-+ });
-+
-+ phased_loop = loop1->AddPhasedLoop(
-+ [&expected_times, &loop1, manager_timer](int count) {
-+ EXPECT_EQ(count, 1);
-+ expected_times.push_back(loop1->context().monotonic_event_time);
-+
-+ manager_timer->Setup(loop1->context().monotonic_event_time);
-+ },
-+ kInterval, kOffset);
-+ phased_loop->set_name("Test loop");
-+ manager_timer->set_name("Manager timer");
-+
-+ Run();
-+
-+ ASSERT_EQ(2u, expected_times.size());
-+ ASSERT_EQ(expected_times[0] + kInterval, expected_times[1]);
-+}
-+
-+// Tests that a phased loop responds correctly to being rescheduled at a time in
-+// the distant future.
-+TEST_P(AbstractEventLoopTest, PhasedLoopRescheduleFuture) {
-+ const chrono::milliseconds kOffset = chrono::milliseconds(400);
-+ const chrono::milliseconds kInterval = chrono::milliseconds(1000);
-+
-+ auto loop1 = MakePrimary();
-+
-+ std::vector<::aos::monotonic_clock::time_point> expected_times;
-+
-+ PhasedLoopHandler *phased_loop;
-+
-+ bool should_exit = false;
-+ int expected_count = 1;
-+ TimerHandler *manager_timer = loop1->AddTimer(
-+ [&expected_count, &phased_loop, &loop1, &should_exit, this, kInterval]() {
-+ if (should_exit) {
-+ LOG(INFO) << "Exiting";
-+ this->Exit();
-+ return;
-+ }
-+ expected_count = 10;
-+ // Knock off 1 ns, since the scheduler rounds up when it is
-+ // scheduled to exactly a loop time.
-+ phased_loop->Reschedule(loop1->context().monotonic_event_time +
-+ kInterval * expected_count -
-+ std::chrono::nanoseconds(1));
-+ should_exit = true;
-+ });
-+
-+ phased_loop = loop1->AddPhasedLoop(
-+ [&expected_times, &loop1, manager_timer, &expected_count](int count) {
-+ EXPECT_EQ(count, expected_count);
-+ expected_times.push_back(loop1->context().monotonic_event_time);
-+
-+ manager_timer->Setup(loop1->context().monotonic_event_time);
-+ },
-+ kInterval, kOffset);
-+ phased_loop->set_name("Test loop");
-+ manager_timer->set_name("Manager timer");
-+
-+ Run();
-+
-+ ASSERT_EQ(2u, expected_times.size());
-+ ASSERT_EQ(expected_times[0] + expected_count * kInterval, expected_times[1]);
-+}
-+
-+// Tests that a phased loop responds correctly to having its phase offset
-+// incremented and then being scheduled after a set time, exercising a pattern
-+// where a phased loop's offset is changed while trying to maintain the trigger
-+// at a consistent period.
-+TEST_P(AbstractEventLoopTest, PhasedLoopRescheduleWithLaterOffset) {
-+ const chrono::milliseconds kOffset = chrono::milliseconds(400);
-+ const chrono::milliseconds kInterval = chrono::milliseconds(1000);
-+
-+ auto loop1 = MakePrimary();
-+
-+ std::vector<::aos::monotonic_clock::time_point> expected_times;
-+
-+ PhasedLoopHandler *phased_loop;
-+
-+ bool should_exit = false;
-+ TimerHandler *manager_timer = loop1->AddTimer(
-+ [&phased_loop, &loop1, &should_exit, this, kInterval, kOffset]() {
-+ if (should_exit) {
-+ LOG(INFO) << "Exiting";
-+ this->Exit();
-+ return;
-+ }
-+ // Schedule the next callback to be strictly later than the current time
-+ // + interval / 2, to ensure a consistent frequency.
-+ monotonic_clock::time_point half_time =
-+ loop1->context().monotonic_event_time + kInterval / 2;
-+ phased_loop->set_interval_and_offset(
-+ kInterval, kOffset + std::chrono::nanoseconds(1), half_time);
-+ phased_loop->Reschedule(half_time);
-+ should_exit = true;
-+ });
-+
-+ phased_loop = loop1->AddPhasedLoop(
-+ [&expected_times, &loop1, manager_timer](int count) {
-+ EXPECT_EQ(1, count);
-+ expected_times.push_back(loop1->context().monotonic_event_time);
-+
-+ manager_timer->Setup(loop1->context().monotonic_event_time);
-+ },
-+ kInterval, kOffset);
-+ phased_loop->set_name("Test loop");
-+ manager_timer->set_name("Manager timer");
-+
-+ Run();
-+
-+ ASSERT_EQ(2u, expected_times.size());
-+ ASSERT_EQ(expected_times[0] + kInterval + std::chrono::nanoseconds(1),
-+ expected_times[1]);
-+}
-+
-+// Tests that a phased loop responds correctly to having its phase offset
-+// decremented and then being scheduled after a set time, exercising a pattern
-+// where a phased loop's offset is changed while trying to maintain the trigger
-+// at a consistent period.
-+TEST_P(AbstractEventLoopTest, PhasedLoopRescheduleWithEarlierOffset) {
-+ const chrono::milliseconds kOffset = chrono::milliseconds(400);
-+ const chrono::milliseconds kInterval = chrono::milliseconds(1000);
-+
-+ auto loop1 = MakePrimary();
-+
-+ std::vector<::aos::monotonic_clock::time_point> expected_times;
-+
-+ PhasedLoopHandler *phased_loop;
-+
-+ bool should_exit = false;
-+ TimerHandler *manager_timer = loop1->AddTimer(
-+ [&phased_loop, &loop1, &should_exit, this, kInterval, kOffset]() {
-+ if (should_exit) {
-+ LOG(INFO) << "Exiting";
-+ this->Exit();
-+ return;
-+ }
-+ // Schedule the next callback to be strictly later than the current time
-+ // + interval / 2, to ensure a consistent frequency.
-+ const aos::monotonic_clock::time_point half_time =
-+ loop1->context().monotonic_event_time + kInterval / 2;
-+ phased_loop->set_interval_and_offset(
-+ kInterval, kOffset - std::chrono::nanoseconds(1), half_time);
-+ phased_loop->Reschedule(half_time);
-+ should_exit = true;
-+ });
-+
-+ phased_loop = loop1->AddPhasedLoop(
-+ [&expected_times, &loop1, manager_timer](int count) {
-+ EXPECT_EQ(1, count);
-+ expected_times.push_back(loop1->context().monotonic_event_time);
-+
-+ manager_timer->Setup(loop1->context().monotonic_event_time);
-+ },
-+ kInterval, kOffset);
-+ phased_loop->set_name("Test loop");
-+ manager_timer->set_name("Manager timer");
-+
-+ Run();
-+
-+ ASSERT_EQ(2u, expected_times.size());
-+ ASSERT_EQ(expected_times[0] + kInterval - std::chrono::nanoseconds(1),
-+ expected_times[1]);
-+}
-+
- // Tests that senders count correctly in the timing report.
- TEST_P(AbstractEventLoopTest, SenderTimingReport) {
- gflags::FlagSaver flag_saver;
diff --git a/aos/events/logging/log_reader.cc b/aos/events/logging/log_reader.cc
index a299c61..1e7644f 100644
--- a/aos/events/logging/log_reader.cc
+++ b/aos/events/logging/log_reader.cc
@@ -750,18 +750,10 @@
<< ": Hmm, we have a node starting before the start of time. Offset "
"everything.";
- // While we are starting the system up, we might be relying on matching data
- // to timestamps on log files where the timestamp log file starts before the
- // data. In this case, it is reasonable to expect missing data.
{
- const bool prior_ignore_missing_data = ignore_missing_data_;
- ignore_missing_data_ = true;
VLOG(1) << "Running until " << start_time << " in Register";
event_loop_factory_->RunFor(start_time.time_since_epoch());
VLOG(1) << "At start time";
- // Now that we are running for real, missing data means that the log file is
- // corrupted or went wrong.
- ignore_missing_data_ = prior_ignore_missing_data;
}
for (std::unique_ptr<State> &state : states_) {
diff --git a/aos/events/logging/log_reader.h b/aos/events/logging/log_reader.h
index e536c46..ddf9116 100644
--- a/aos/events/logging/log_reader.h
+++ b/aos/events/logging/log_reader.h
@@ -63,6 +63,24 @@
//
// We also need to be able to generate multiple views of a log file depending on
// the target.
+//
+// In general, we aim to guarantee that if you are using the LogReader
+// "normally" you should be able to observe all the messages that existed on the
+// live system between the start time and the end of the logfile, and that
+// CHECK-failures will be generated if the LogReader cannot satisfy that
+// guarantee. There are currently a few deliberate exceptions to this:
+// * Any channel marked NOT_LOGGED in the configuration is known not to
+// have been logged and thus will be silently absent in log replay.
+// * If an incomplete set of log files is provided to the reader (e.g.,
+// only logs logged on a single node on a multi-node system), then
+// any *individual* channel as observed on a given node will be
+// consistent, but similarly to a NOT_LOGGED channel, some data may
+// not be available.
+// * At the end of a log, data for some channels/nodes may end before
+// others; during this time period, you may observe silently dropped
+// messages. This will be most obvious on uncleanly terminated logs or
+// when merging logfiles across nodes (as the logs on different nodes
+// will not finish at identical times).
// Replays all the channels in the logfile to the event loop.
class LogReader {
@@ -153,6 +171,12 @@
std::vector<const Node *> LoggedNodes() const;
// Returns the starting timestamp for the log file.
+ // All logged channels for the specified node should be entirely available
+ // after the specified time (i.e., any message that was available on the node
+ // in question after the monotonic start time but before the logs end and
+ // whose channel is present in any of the provided logs will either be
+ // available in the log or will result in an internal CHECK-failure of the
+ // LogReader if it would be skipped).
monotonic_clock::time_point monotonic_start_time(
const Node *node = nullptr) const;
realtime_clock::time_point realtime_start_time(
diff --git a/aos/events/logging/logger.fbs b/aos/events/logging/logger.fbs
index 71a7b02..ec1a450 100644
--- a/aos/events/logging/logger.fbs
+++ b/aos/events/logging/logger.fbs
@@ -17,8 +17,15 @@
// Time this log file started on the monotonic clock in nanoseconds.
// If this isn't known (the log file is being recorded from another node
// where we don't know the time offset), both timestamps will be min_time.
+ // This log file may contain data from before the start times (e.g.,
+ // fetched message data), but should guarantee that all data within the
+ // logfile *after* start_time is present until the end of the file (note
+ // that there may be incomplete data at the very end of a log if it is
+ // truncated poorly).
+ // These timestamps are from the perspective of `node`.
monotonic_start_time:int64 = -9223372036854775808 (id: 0);
// Time this log file started on the realtime clock in nanoseconds.
+ // Will only be populated if logger_node == node.
realtime_start_time:int64 = -9223372036854775808 (id: 1);
// Messages are not written in order to disk. They will be out of order by
diff --git a/aos/events/logging/multinode_logger_test.cc b/aos/events/logging/multinode_logger_test.cc
index 9e2d3a3..f9eb11e 100644
--- a/aos/events/logging/multinode_logger_test.cc
+++ b/aos/events/logging/multinode_logger_test.cc
@@ -768,7 +768,7 @@
}
LogReader reader(
- SortParts(MakeLogFiles(logfile_base1_, logfile_base2_, 3, 2)));
+ SortParts(MakeLogFiles(logfile_base1_, logfile_base2_, 3, 3)));
SimulatedEventLoopFactory log_reader_factory(reader.configuration());
log_reader_factory.set_send_delay(chrono::microseconds(0));
diff --git a/aos/ipc_lib/BUILD b/aos/ipc_lib/BUILD
index 381a273..cc46dac 100644
--- a/aos/ipc_lib/BUILD
+++ b/aos/ipc_lib/BUILD
@@ -212,6 +212,7 @@
name = "lockless_queue_test",
timeout = "eternal",
srcs = ["lockless_queue_test.cc"],
+ shard_count = 10,
target_compatible_with = ["@platforms//os:linux"],
deps = [
":event",
diff --git a/debian/packages.bzl b/debian/packages.bzl
index 6b039f8..e6e34a6 100644
--- a/debian/packages.bzl
+++ b/debian/packages.bzl
@@ -12,7 +12,7 @@
# you can pass flags here to control those. See the --help for details.
# 2. The "download_packages" steps prints the location of the deb packages
# after it prints the "_files" dictionary. Take the deb packages from there
-# and upload them to https://www.frc971.org/Build-Dependencies/.
+# and upload them to https://software.frc971.org/Build-Dependencies/.
# 3. Add the newly uploaded deb packages as WORKSPACE entries using the
# "generate_repositories_for_debs" helper. Load the "_files" dictionary
# created earlier and the "generate_repositories_for_debs" helper and call
@@ -20,7 +20,7 @@
# 4. Add a "generate_deb_tarball" target to //debian/BUILD. Pass in the
# "_files" dictionary created earlier by loading it from the .bzl file.
# 5. Invoke "bazel build" on the "generate_deb_tarball" target you just created
-# and upload the resulting tarball to https://www.frc971.org/Build-Dependencies.
+# and upload the resulting tarball to https://software.frc971.org/Build-Dependencies.
# 6. Add a new "new_http_archive" entry to the WORKSPACE file for the tarball
# you just uploaded.
@@ -32,7 +32,7 @@
Use "bazel run" on these targets to download the packages and generate the
list to use in a .bzl file. Once you have the packages on
- https://www.frc971.org/Build-Dependencies/ you can add them to a to
+ https://software.frc971.org/Build-Dependencies/ you can add them to a to
combine_packages rule.
force_includes lets you include packages that are excluded by default. The
@@ -91,7 +91,7 @@
target = target.replace("~", "_")
return "deb_%s_repo" % target
-def generate_repositories_for_debs(files, base_url = "https://www.frc971.org/Build-Dependencies"):
+def generate_repositories_for_debs(files, base_url = "https://software.frc971.org/Build-Dependencies"):
"""A WORKSPACE helper to add all the deb packages in the dictionary as a repo.
The files dictionary must be one generated with the "download_packages"
diff --git a/tools/bazel b/tools/bazel
index 82a86fe..2bfebef 100755
--- a/tools/bazel
+++ b/tools/bazel
@@ -41,7 +41,7 @@
fi
readonly INSTALLER_NAME="bazel_${VERSION}.xz"
-readonly DOWNLOAD_URL="https://www.frc971.org/Build-Dependencies/${INSTALLER_NAME}"
+readonly DOWNLOAD_URL="https://software.frc971.org/Build-Dependencies/${INSTALLER_NAME}"
if [[ ! -d "${VERSION_DIR}" ]]; then
echo "Downloading Bazel version ${VERSION} from ${DOWNLOAD_URL}..." >&2
diff --git a/tools/go/mirrored_go_deps.bzl b/tools/go/mirrored_go_deps.bzl
index adac994..dbf4f29 100644
--- a/tools/go/mirrored_go_deps.bzl
+++ b/tools/go/mirrored_go_deps.bzl
@@ -41,7 +41,7 @@
strip_prefix = info["strip_prefix"],
type = "zip",
urls = [
- "https://www.frc971.org/Build-Dependencies/go_deps/" + info["filename"],
+ "https://software.frc971.org/Build-Dependencies/go_deps/" + info["filename"],
],
sha256 = info["sha256"],
importpath = info["importpath"],
diff --git a/tools/lint/BUILD b/tools/lint/BUILD
index 23ba4d6..a881124 100644
--- a/tools/lint/BUILD
+++ b/tools/lint/BUILD
@@ -7,6 +7,17 @@
)
sh_binary(
+ name = "clang_format",
+ srcs = ["clang_format.sh"],
+ data = [
+ "@llvm_k8//:bin",
+ ],
+ deps = [
+ "@bazel_tools//tools/bash/runfiles",
+ ],
+)
+
+sh_binary(
name = "gofmt",
srcs = ["gofmt.sh"],
data = [
@@ -70,6 +81,7 @@
],
data = [
":buildifier",
+ ":clang_format",
":gofmt",
":prettier",
":rustfmt",
diff --git a/tools/lint/clang_format.sh b/tools/lint/clang_format.sh
new file mode 100755
index 0000000..3084520
--- /dev/null
+++ b/tools/lint/clang_format.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# --- begin runfiles.bash initialization v2 ---
+# Copy-pasted from the Bazel Bash runfiles library v2.
+set -uo pipefail; f=bazel_tools/tools/bash/runfiles/runfiles.bash
+source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \
+ source "$(grep -sm1 "^$f " "${RUNFILES_MANIFEST_FILE:-/dev/null}" | cut -f2- -d' ')" 2>/dev/null || \
+ source "$0.runfiles/$f" 2>/dev/null || \
+ source "$(grep -sm1 "^$f " "$0.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
+ source "$(grep -sm1 "^$f " "$0.exe.runfiles_manifest" | cut -f2- -d' ')" 2>/dev/null || \
+ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e
+# --- end runfiles.bash initialization v2 ---
+
+readonly CLANG_FORMAT="$(rlocation llvm_k8/bin/clang-format)"
+
+# Run everything from the root of the tree.
+cd "${BUILD_WORKSPACE_DIRECTORY}"
+
+# Find all the C/C++ files in the repo.
+# Exclude third-party code. Both in //third_party and the third-party code
+# checked in to the main repo directly.
+cc_files=($(git ls-tree --name-only --full-tree -r @ \
+ | grep -v -e '^third_party/' \
+ -e '^motors/core/kinetis.h$' \
+ -e '^y2023/vision/rkisp1-config.h$' \
+ | (grep -e '\.c$' -e '\.cc$' -e '\.h' || :)))
+
+# If we have any C/C++ files, format them.
+if ((${#cc_files[@]} > 0)); then
+ exec "${CLANG_FORMAT}" -i "${cc_files[@]}"
+fi
diff --git a/tools/lint/run-ci.sh b/tools/lint/run-ci.sh
index 6e026ee..1f5fda4 100755
--- a/tools/lint/run-ci.sh
+++ b/tools/lint/run-ci.sh
@@ -23,6 +23,10 @@
export GOCACHE=/tmp/lint_go_cache
fi
+clang_format() {
+ ./tools/lint/clang_format
+}
+
gofmt() {
./tools/lint/gofmt
}
@@ -110,6 +114,7 @@
# All the linters that we are going to run.
readonly -a LINTERS=(
+ #clang_format
gofmt
gomod
update_go_repos
diff --git a/y2019/vision/tools/flash.sh b/y2019/vision/tools/flash.sh
index 777ea90..a7db4f2 100755
--- a/y2019/vision/tools/flash.sh
+++ b/y2019/vision/tools/flash.sh
@@ -9,13 +9,13 @@
echo "Pulling Binaries ..."
if [ ! -f "./libjevoisbase.so" ]
then
- wget https://www.frc971.org/Build-Dependencies/libjevoisbase.so
+ wget https://software.frc971.org/Build-Dependencies/libjevoisbase.so
fi
echo "Got libjevoisbase.so"
if [ ! -f "./PassThrough.so" ]
then
- wget https://www.frc971.org/Build-Dependencies/PassThrough.so
+ wget https://software.frc971.org/Build-Dependencies/PassThrough.so
fi
echo "Got PassThrough.so"