From 2a0ae43a155cc20e3d4828efbf3264b38b61e68f Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Wed, 22 Jan 2025 21:36:46 -0800 Subject: [PATCH] Update to WPILib 2025.2.1 --- deps/examples/cpp-multiCameraServer/main.cpp | 12 +-- deps/tools/configServer/Makefile | 1 + deps/tools/configServer/src/Application.cpp | 14 ++-- .../configServer/src/NetworkSettings.cpp | 76 +++++++++---------- deps/tools/configServer/src/RomiStatus.cpp | 38 +++++----- .../tools/configServer/src/VisionSettings.cpp | 8 +- deps/tools/configServer/src/VisionStatus.cpp | 30 ++++---- deps/tools/multiCameraServer/Makefile | 6 +- .../src/multiCameraServer.cpp | 11 ++- stage3/01-sys-tweaks/01-run.sh | 34 ++++----- 10 files changed, 115 insertions(+), 115 deletions(-) diff --git a/deps/examples/cpp-multiCameraServer/main.cpp b/deps/examples/cpp-multiCameraServer/main.cpp index 8c3d800828..fbbefc85e2 100644 --- a/deps/examples/cpp-multiCameraServer/main.cpp +++ b/deps/examples/cpp-multiCameraServer/main.cpp @@ -12,9 +12,9 @@ #include #include #include +#include #include #include -#include #include "cameraserver/CameraServer.h" @@ -149,17 +149,17 @@ bool ReadSwitchedCameraConfig(const wpi::json& config) { bool ReadConfig() { // open config file - std::error_code ec; - wpi::raw_fd_istream is(configFile, ec); - if (ec) { - fmt::print(stderr, "could not open '{}': {}", configFile, ec.message()); + auto fileBuffer = wpi::MemoryBuffer::GetFile(configFile); + if (!fileBuffer) { + fmt::print(stderr, "could not open '{}': {}", configFile, + fileBuffer.error().message()); return false; } // parse file wpi::json j; try { - j = wpi::json::parse(is); + j = wpi::json::parse((*fileBuffer)->GetCharBuffer()); } catch (const wpi::json::parse_error& e) { ParseError("byte {}: {}", e.byte, e.what()); return false; diff --git a/deps/tools/configServer/Makefile b/deps/tools/configServer/Makefile index cd9f656d4f..8441587efe 100644 --- a/deps/tools/configServer/Makefile +++ b/deps/tools/configServer/Makefile @@ -6,6 +6,7 @@ IMG_VERSION?=$(shell git describe) -I${ALLWPILIB}/wpiutil/src/main/native/include \ -I${ALLWPILIB}/wpinet/src/main/native/include \ -I${ALLWPILIB}/cscore/src/main/native/include \ + -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/expected/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/llvm/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/sigslot/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/fmtlib/include \ diff --git a/deps/tools/configServer/src/Application.cpp b/deps/tools/configServer/src/Application.cpp index 3de0795616..a6105aecb5 100644 --- a/deps/tools/configServer/src/Application.cpp +++ b/deps/tools/configServer/src/Application.cpp @@ -70,13 +70,13 @@ void Application::Set(std::string_view appType, onFail("could not write " EXEC_HOME "/runCamera"); return; } - fmt::print(os, "#!/bin/sh\n"); - fmt::print(os, "{} {}\n", TYPE_TAG, appType); - fmt::print(os, "echo \"Waiting 5 seconds...\"\n"); - fmt::print(os, "sleep 5\n"); - if (!appDir.empty()) fmt::print(os, "cd {}\n", appDir); - if (!appEnv.empty()) fmt::print(os, "{}\n", appEnv); - fmt::print(os, "exec {}\n", appCommand); + wpi::print(os, "#!/bin/sh\n"); + wpi::print(os, "{} {}\n", TYPE_TAG, appType); + wpi::print(os, "echo \"Waiting 5 seconds...\"\n"); + wpi::print(os, "sleep 5\n"); + if (!appDir.empty()) wpi::print(os, "cd {}\n", appDir); + if (!appEnv.empty()) wpi::print(os, "{}\n", appEnv); + wpi::print(os, "exec {}\n", appCommand); } // terminate vision process so it reloads diff --git a/deps/tools/configServer/src/NetworkSettings.cpp b/deps/tools/configServer/src/NetworkSettings.cpp index 00d1527c02..c14a15b01b 100644 --- a/deps/tools/configServer/src/NetworkSettings.cpp +++ b/deps/tools/configServer/src/NetworkSettings.cpp @@ -120,25 +120,25 @@ static std::string BuildDhcpcdSetting( // write generated config switch (mode) { case NetworkSettings::kDhcp: - fmt::print(os, "\n"); // nothing required + wpi::print(os, "\n"); // nothing required break; case NetworkSettings::kStatic: - fmt::print(os, "interface {}\n", iface); - fmt::print(os, "static ip_address={}/{}\n", addressOut.str(), cidr); + wpi::print(os, "interface {}\n", iface); + wpi::print(os, "static ip_address={}/{}\n", addressOut.str(), cidr); if (!gatewayOut.empty()) - fmt::print(os, "static routers={}\n", gatewayOut.str()); + wpi::print(os, "static routers={}\n", gatewayOut.str()); if (!dnsOut.empty()) - fmt::print(os, "static domain_name_servers={}\n", dnsOut.str()); + wpi::print(os, "static domain_name_servers={}\n", dnsOut.str()); break; case NetworkSettings::kDhcpStatic: - fmt::print(os, "profile static_{}\n", iface); - fmt::print(os, "static ip_address={}/{}\n", addressOut.str(), cidr); + wpi::print(os, "profile static_{}\n", iface); + wpi::print(os, "static ip_address={}/{}\n", addressOut.str(), cidr); if (!gatewayOut.empty()) - fmt::print(os, "static routers={}\n", gatewayOut.str()); + wpi::print(os, "static routers={}\n", gatewayOut.str()); if (!dnsOut.empty()) - fmt::print(os, "static domain_name_servers={}\n", dnsOut.str()); - fmt::print(os, "interface {}\n", iface); - fmt::print(os, "fallback static_{}\n", iface); + wpi::print(os, "static domain_name_servers={}\n", dnsOut.str()); + wpi::print(os, "interface {}\n", iface); + wpi::print(os, "fallback static_{}\n", iface); break; } return os.str(); @@ -210,16 +210,16 @@ void NetworkSettings::Set(Mode mode, std::string_view address, onFail("could not write " DHCPCD_CONF); return; } - for (auto&& line : lines) fmt::print(os, "{}\n", line); + for (auto&& line : lines) wpi::print(os, "{}\n", line); // write marker - fmt::print(os, "{}\n", GEN_MARKER); + wpi::print(os, "{}\n", GEN_MARKER); // write generated config - fmt::print(os, "{}\n", eth0); - fmt::print(os, "{}", wlan0); + wpi::print(os, "{}\n", eth0); + wpi::print(os, "{}", wlan0); if (wifiAPMode == kAccessPoint) { - fmt::print(os, "nohook wpa_supplicant\n"); + wpi::print(os, "nohook wpa_supplicant\n"); } } } @@ -244,8 +244,8 @@ void NetworkSettings::Set(Mode mode, std::string_view address, onFail("could not write " DNSMASQ_CONF); return; } - fmt::print(os, "interface=wlan0\n"); - fmt::print(os, "dhcp-range={}.100,{}.200,{},5m\n", addr3part, addr3part, + wpi::print(os, "interface=wlan0\n"); + wpi::print(os, "dhcp-range={}.100,{}.200,{},5m\n", addr3part, addr3part, wifiMask); } else { // remove dnsmasq config file @@ -262,20 +262,20 @@ void NetworkSettings::Set(Mode mode, std::string_view address, onFail("could not write " HOSTAPD_CONF); return; } - fmt::print(os, "interface=wlan0\n"); - fmt::print(os, "hw_mode=g\n"); - fmt::print(os, "channel={}\n", wifiChannel); - fmt::print(os, "wmm_enabled=0\n"); - fmt::print(os, "macaddr_acl=0\n"); - fmt::print(os, "auth_algs=1\n"); - fmt::print(os, "ignore_broadcast_ssid=0\n"); - fmt::print(os, "ssid={}\n", wifiSsid); + wpi::print(os, "interface=wlan0\n"); + wpi::print(os, "hw_mode=g\n"); + wpi::print(os, "channel={}\n", wifiChannel); + wpi::print(os, "wmm_enabled=0\n"); + wpi::print(os, "macaddr_acl=0\n"); + wpi::print(os, "auth_algs=1\n"); + wpi::print(os, "ignore_broadcast_ssid=0\n"); + wpi::print(os, "ssid={}\n", wifiSsid); if (!wifiWpa2.empty()) { - fmt::print(os, "wpa=2\n"); - fmt::print(os, "wpa_key_mgmt=WPA-PSK\n"); - fmt::print(os, "wpa_pairwise=TKIP\n"); - fmt::print(os, "rsn_pairwise=CCMP\n"); - fmt::print(os, "wpa_passphrase={}\n", wifiWpa2); + wpi::print(os, "wpa=2\n"); + wpi::print(os, "wpa_key_mgmt=WPA-PSK\n"); + wpi::print(os, "wpa_pairwise=TKIP\n"); + wpi::print(os, "rsn_pairwise=CCMP\n"); + wpi::print(os, "wpa_passphrase={}\n", wifiWpa2); } } else { // remove hostapd config file @@ -312,20 +312,20 @@ void NetworkSettings::Set(Mode mode, std::string_view address, onFail("could not write " WPA_SUPPLICANT_CONF); return; } - for (auto&& line : lines) fmt::print(os, "{}\n", line); + for (auto&& line : lines) wpi::print(os, "{}\n", line); // write marker - fmt::print(os, "{}\n", GEN_MARKER); + wpi::print(os, "{}\n", GEN_MARKER); // write generated config - fmt::print(os, "network={\n"); - fmt::print(os, " ssid=\"{}\"\n", wifiSsid); + wpi::print(os, "network={\n"); + wpi::print(os, " ssid=\"{}\"\n", wifiSsid); if (!wifiWpa2.empty()) { - fmt::print(os, " psk=\"{}\"\n", wifiWpa2); + wpi::print(os, " psk=\"{}\"\n", wifiWpa2); } else { - fmt::print(os, " key_mgmt=NONE\n"); + wpi::print(os, " key_mgmt=NONE\n"); } - fmt::print(os, "}\n"); + wpi::print(os, "}\n"); } } diff --git a/deps/tools/configServer/src/RomiStatus.cpp b/deps/tools/configServer/src/RomiStatus.cpp index 6ceed71b5e..e8432b8572 100644 --- a/deps/tools/configServer/src/RomiStatus.cpp +++ b/deps/tools/configServer/src/RomiStatus.cpp @@ -57,14 +57,14 @@ void RomiStatus::RunSvc(const char* cmd, if (fd == -1) { wpi::raw_svector_ostream os(r->err); if (errno == ENXIO) - fmt::print(os, "unable to control service: supervise not running"); + wpi::print(os, "unable to control service: supervise not running"); else - fmt::print(os, "unable to control service: {}", std::strerror(errno)); + wpi::print(os, "unable to control service: {}", std::strerror(errno)); } else { fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); if (write(fd, r->cmd, std::strlen(r->cmd)) == -1) { wpi::raw_svector_ostream os(r->err); - fmt::print(os, "error writing command: {}", std::strerror(errno)); + wpi::print(os, "error writing command: {}", std::strerror(errno)); } close(fd); } @@ -111,9 +111,9 @@ void RomiStatus::UpdateStatus() { int fd = open(SERVICE "/supervise/ok", O_WRONLY | O_NDELAY); if (fd == -1) { if (errno == ENXIO) - fmt::print(os, "supervise not running"); + wpi::print(os, "supervise not running"); else - fmt::print(os, "unable to open supervise/ok: {}", std::strerror(errno)); + wpi::print(os, "unable to open supervise/ok: {}", std::strerror(errno)); return; } close(fd); @@ -121,7 +121,7 @@ void RomiStatus::UpdateStatus() { // read the status data fd = open(SERVICE "/supervise/status", O_RDONLY | O_NDELAY); if (fd == -1) { - fmt::print(os, "unable to open supervise/status: {}", + wpi::print(os, "unable to open supervise/status: {}", std::strerror(errno)); return; } @@ -129,11 +129,11 @@ void RomiStatus::UpdateStatus() { int nr = read(fd, status, sizeof status); close(fd); if (nr < static_cast(sizeof status)) { - fmt::print(os, "unable to read supervise/status: "); + wpi::print(os, "unable to read supervise/status: "); if (nr == -1) - fmt::print(os, "{}", std::strerror(errno)); + wpi::print(os, "{}", std::strerror(errno)); else - fmt::print(os, "bad format"); + wpi::print(os, "bad format"); return; } @@ -163,13 +163,13 @@ void RomiStatus::UpdateStatus() { // convert to status string if (pid) - fmt::print(os, "up (pid {}) ", pid); + wpi::print(os, "up (pid {}) ", pid); else - fmt::print(os, "down "); - fmt::print(os, "{} seconds", when); - if (pid && paused) fmt::print(os, ", paused"); - if (!pid && want == 'u') fmt::print(os, ", want up"); - if (pid && want == 'd') fmt::print(os, ", want down"); + wpi::print(os, "down "); + wpi::print(os, "{} seconds", when); + if (pid && paused) wpi::print(os, ", paused"); + if (!pid && want == 'u') wpi::print(os, ", want up"); + if (pid && want == 'd') wpi::print(os, ", want down"); if (pid) r->enabled = true; }); @@ -237,11 +237,9 @@ void RomiStatus::UpdateConfig(std::function onFail) { wpi::json RomiStatus::ReadRomiConfigFile( std::function onFail) { // Read config file - std::error_code ec; - std::unique_ptr fileBuffer = - wpi::MemoryBuffer::GetFile(ROMI_JSON, ec); + auto fileBuffer = wpi::MemoryBuffer::GetFile(ROMI_JSON); - if (fileBuffer == nullptr || ec) { + if (!fileBuffer) { onFail("Could not read romi config file"); fmt::print(stderr, "could not read {}\n", ROMI_JSON); return wpi::json(); @@ -249,7 +247,7 @@ wpi::json RomiStatus::ReadRomiConfigFile( wpi::json j; try { - j = wpi::json::parse(fileBuffer->GetCharBuffer()); + j = wpi::json::parse((*fileBuffer)->GetCharBuffer()); } catch(const wpi::json::parse_error& e) { onFail("Parse error in config file"); fmt::print(stderr, "Parse error in {}: byte {}: {}\n", ROMI_JSON, e.byte, diff --git a/deps/tools/configServer/src/VisionSettings.cpp b/deps/tools/configServer/src/VisionSettings.cpp index 66d0d10ee1..2f3a599af9 100644 --- a/deps/tools/configServer/src/VisionSettings.cpp +++ b/deps/tools/configServer/src/VisionSettings.cpp @@ -41,18 +41,16 @@ void VisionSettings::Set(const wpi::json& data, void VisionSettings::UpdateStatus() { status(GetStatusJson()); } wpi::json VisionSettings::GetStatusJson() { - std::error_code ec; - std::unique_ptr fileBuffer = - wpi::MemoryBuffer::GetFile(FRC_JSON, ec); + auto fileBuffer = wpi::MemoryBuffer::GetFile(FRC_JSON); - if (fileBuffer == nullptr || ec) { + if (!fileBuffer) { fmt::print(stderr, "could not read {}\n", FRC_JSON); return wpi::json(); } try { wpi::json j = {{"type", "visionSettings"}, - {"settings", wpi::json::parse(fileBuffer->GetCharBuffer())}}; + {"settings", wpi::json::parse((*fileBuffer)->GetCharBuffer())}}; return j; } catch (wpi::json::exception& e) { fmt::print(stderr, "could not parse {}\n", FRC_JSON); diff --git a/deps/tools/configServer/src/VisionStatus.cpp b/deps/tools/configServer/src/VisionStatus.cpp index becbdbf2eb..f03d066b38 100644 --- a/deps/tools/configServer/src/VisionStatus.cpp +++ b/deps/tools/configServer/src/VisionStatus.cpp @@ -142,14 +142,14 @@ void VisionStatus::RunSvc(const char* cmd, if (fd == -1) { wpi::raw_svector_ostream os(r->err); if (errno == ENXIO) - fmt::print(os, "unable to control service: supervise not running"); + wpi::print(os, "unable to control service: supervise not running"); else - fmt::print(os, "unable to control service: {}", std::strerror(errno)); + wpi::print(os, "unable to control service: {}", std::strerror(errno)); } else { fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) & ~O_NONBLOCK); if (write(fd, r->cmd, std::strlen(r->cmd)) == -1) { wpi::raw_svector_ostream os(r->err); - fmt::print(os, "error writing command: {}", std::strerror(errno)); + wpi::print(os, "error writing command: {}", std::strerror(errno)); } close(fd); } @@ -196,9 +196,9 @@ void VisionStatus::UpdateStatus() { int fd = open(SERVICE "/supervise/ok", O_WRONLY | O_NDELAY); if (fd == -1) { if (errno == ENXIO) - fmt::print(os, "supervise not running"); + wpi::print(os, "supervise not running"); else - fmt::print(os, "unable to open supervise/ok: {}", std::strerror(errno)); + wpi::print(os, "unable to open supervise/ok: {}", std::strerror(errno)); return; } close(fd); @@ -206,7 +206,7 @@ void VisionStatus::UpdateStatus() { // read the status data fd = open(SERVICE "/supervise/status", O_RDONLY | O_NDELAY); if (fd == -1) { - fmt::print(os, "unable to open supervise/status: {}", + wpi::print(os, "unable to open supervise/status: {}", std::strerror(errno)); return; } @@ -214,11 +214,11 @@ void VisionStatus::UpdateStatus() { int nr = read(fd, status, sizeof status); close(fd); if (nr < static_cast(sizeof status)) { - fmt::print(os, "unable to read supervise/status: "); + wpi::print(os, "unable to read supervise/status: "); if (nr == -1) - fmt::print(os, std::strerror(errno)); + wpi::print(os, std::strerror(errno)); else - fmt::print(os, "bad format"); + wpi::print(os, "bad format"); return; } @@ -248,13 +248,13 @@ void VisionStatus::UpdateStatus() { // convert to status string if (pid) - fmt::print(os, "up (pid {}) ", pid); + wpi::print(os, "up (pid {}) ", pid); else - fmt::print(os, "down "); - fmt::print(os, "{} seconds", when); - if (pid && paused) fmt::print(os, ", paused"); - if (!pid && want == 'u') fmt::print(os, ", want up"); - if (pid && want == 'd') fmt::print(os, ", want down"); + wpi::print(os, "down "); + wpi::print(os, "{} seconds", when); + if (pid && paused) wpi::print(os, ", paused"); + if (!pid && want == 'u') wpi::print(os, ", want up"); + if (pid && want == 'd') wpi::print(os, ", want down"); if (pid) r->enabled = true; }); diff --git a/deps/tools/multiCameraServer/Makefile b/deps/tools/multiCameraServer/Makefile index 2c890c1370..6a1be1c873 100644 --- a/deps/tools/multiCameraServer/Makefile +++ b/deps/tools/multiCameraServer/Makefile @@ -1,18 +1,22 @@ # For a desktop build with the allwpilib source tree: #ALLWPILIB=/home/peter/project/frc/allwpilib #DEPS_CFLAGS= \ + $(shell pkg-config --cflags opencv4) \ -I${ALLWPILIB}/wpiutil/src/main/native/include \ -I${ALLWPILIB}/wpinet/src/main/native/include \ -I${ALLWPILIB}/cameraserver/src/main/native/include \ -I${ALLWPILIB}/cscore/src/main/native/include \ -I${ALLWPILIB}/ntcore/src/main/native/include \ + -I${ALLWPILIB}/ntcore/src/generated/main/native/include \ -I${ALLWPILIB}/build-ninja/ntcore/generated/main/native/include \ + -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/expected/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/llvm/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/sigslot/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/fmtlib/include \ -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/json/include \ + -I${ALLWPILIB}/wpiutil/src/main/native/thirdparty/nanopb/include \ -I${ALLWPILIB}/wpinet/src/main/native/thirdparty/libuv/include -#DEPS_LIBS=-L${ALLWPILIB}/build-ninja/lib -lcameraserverd -lntcored -lcscored -lwpinetd -lwpiutild +#DEPS_LIBS=-L${ALLWPILIB}/build-ninja/lib -lcameraserverd -lntcored -lcscored -lwpinetd -lwpiutild $(shell pkg-config --libs --static opencv4) DEPS_CFLAGS?=$(shell pkg-config --cflags cameraserver ntcore wpiutil) DEPS_LIBS?=$(shell pkg-config --libs --static cameraserver ntcore wpiutil) diff --git a/deps/tools/multiCameraServer/src/multiCameraServer.cpp b/deps/tools/multiCameraServer/src/multiCameraServer.cpp index 70c0ccccef..1b37664b95 100644 --- a/deps/tools/multiCameraServer/src/multiCameraServer.cpp +++ b/deps/tools/multiCameraServer/src/multiCameraServer.cpp @@ -151,18 +151,17 @@ bool ReadSwitchedCameraConfig(const wpi::json& config) { bool ReadConfig() { // open config file - std::error_code ec; - std::unique_ptr fileBuffer = - wpi::MemoryBuffer::GetFile(configFile, ec); - if (fileBuffer == nullptr || ec) { - fmt::print(stderr, "could not open '{}': {}", configFile, ec.message()); + auto fileBuffer = wpi::MemoryBuffer::GetFile(configFile); + if (!fileBuffer) { + fmt::print(stderr, "could not open '{}': {}", configFile, + fileBuffer.error().message()); return false; } // parse file wpi::json j; try { - j = wpi::json::parse(fileBuffer->GetCharBuffer()); + j = wpi::json::parse((*fileBuffer)->GetCharBuffer()); } catch (const wpi::json::parse_error& e) { ParseError("byte {}: {}", e.byte, e.what()); return false; diff --git a/stage3/01-sys-tweaks/01-run.sh b/stage3/01-sys-tweaks/01-run.sh index c1d7430ff0..6e4745f044 100755 --- a/stage3/01-sys-tweaks/01-run.sh +++ b/stage3/01-sys-tweaks/01-run.sh @@ -42,13 +42,13 @@ pushd ${DOWNLOAD_DIR} # opencv sources wget -nc -nv \ - https://github.com/opencv/opencv/archive/4.8.0.tar.gz -wget -nc -nv -O contrib-4.8.0.tar.gz \ - https://github.com/opencv/opencv_contrib/archive/4.8.0.tar.gz + https://github.com/opencv/opencv/archive/4.10.0.tar.gz +wget -nc -nv -O contrib-4.10.0.tar.gz \ + https://github.com/opencv/opencv_contrib/archive/4.10.0.tar.gz # allwpilib wget -nc -nv -O allwpilib.tar.gz \ - https://github.com/wpilibsuite/allwpilib/archive/v2024.3.1.tar.gz + https://github.com/wpilibsuite/allwpilib/archive/v2025.2.1.tar.gz ## robotpy-build #wget -nc -nv -O robotpy-build.tar.gz \ @@ -88,10 +88,10 @@ install -v -d ${EXTRACT_DIR} pushd ${EXTRACT_DIR} # opencv -rm -rf opencv-4.8.0 -tar xzf "${DOWNLOAD_DIR}/4.8.0.tar.gz" -tar xzf "${DOWNLOAD_DIR}/contrib-4.8.0.tar.gz" -pushd opencv-4.8.0 +rm -rf opencv-4.10.0 +tar xzf "${DOWNLOAD_DIR}/4.10.0.tar.gz" +tar xzf "${DOWNLOAD_DIR}/contrib-4.10.0.tar.gz" +pushd opencv-4.10.0 sed -i -e 's/javac sourcepath/javac target="1.8" source="1.8" sourcepath/' modules/java/jar/build.xml.in # disable extraneous data warnings; these are common with USB cameras sed -i -e '/JWRN_EXTRANEOUS_DATA/d' 3rdparty/libjpeg/jdmarker.c @@ -135,7 +135,7 @@ build_opencv () { rm -rf $1 mkdir -p $1 pushd $1 - cmake "${EXTRACT_DIR}/opencv-4.8.0" \ + cmake "${EXTRACT_DIR}/opencv-4.10.0" \ -G Ninja \ -DWITH_FFMPEG=OFF \ -DBUILD_JPEG=ON \ @@ -147,7 +147,7 @@ build_opencv () { -DBUILD_SHARED_LIBS=$3 \ -DCMAKE_BUILD_TYPE=$2 \ -DCMAKE_DEBUG_POSTFIX=d \ - -DCMAKE_TOOLCHAIN_FILE=${ROOTFS_DIR}/usr/src/opencv-4.8.0/platforms/linux/aarch64-gnu.toolchain.cmake \ + -DCMAKE_TOOLCHAIN_FILE=${ROOTFS_DIR}/usr/src/opencv-4.10.0/platforms/linux/aarch64-gnu.toolchain.cmake \ -DARM_LINUX_SYSROOT=${ROOTFS_DIR} \ -DCMAKE_SYSROOT=${ROOTFS_DIR} \ -DENABLE_NEON=ON \ @@ -159,7 +159,7 @@ build_opencv () { -DOPENCV_GENERATE_PKGCONFIG=ON \ -DCMAKE_MODULE_PATH=${SUB_STAGE_DIR}/files \ -DCMAKE_INSTALL_PREFIX=/usr/local/frc$4 \ - -DOPENCV_EXTRA_MODULES_PATH=${EXTRACT_DIR}/opencv_contrib-4.8.0/modules/aruco \ + -DOPENCV_EXTRA_MODULES_PATH=${EXTRACT_DIR}/opencv_contrib-4.10.0/modules/aruco \ || exit 1 ninja || exit 1 env DESTDIR=${ROOTFS_DIR} ninja install || exit 1 @@ -200,12 +200,12 @@ build_wpilib () { -DWITH_SIMULATION_MODULES=OFF \ -DWPILIB_TARGET_WARNINGS=-Wno-maybe-uninitialized \ -DCMAKE_BUILD_TYPE=$2 \ - -DCMAKE_TOOLCHAIN_FILE=${ROOTFS_DIR}/usr/src/opencv-4.8.0/platforms/linux/aarch64-gnu.toolchain.cmake \ + -DCMAKE_TOOLCHAIN_FILE=${ROOTFS_DIR}/usr/src/opencv-4.10.0/platforms/linux/aarch64-gnu.toolchain.cmake \ -DARM_LINUX_SYSROOT=${ROOTFS_DIR} \ -DCMAKE_SYSROOT=${ROOTFS_DIR} \ -DCMAKE_MODULE_PATH=${SUB_STAGE_DIR}/files \ - -DOPENCV_JAR_FILE=`ls ${ROOTFS_DIR}/usr/local/frc/java/opencv-480.jar` \ - -DOPENCV_JNI_FILE=`ls ${ROOTFS_DIR}/usr/local/frc/lib/libopencv_java480.so` \ + -DOPENCV_JAR_FILE=`ls ${ROOTFS_DIR}/usr/local/frc/java/opencv-4100.jar` \ + -DOPENCV_JNI_FILE=`ls ${ROOTFS_DIR}/usr/local/frc/lib/libopencv_java4100.so` \ -DOpenCV_DIR=${ROOTFS_DIR}/usr/local/frc/share/opencv4 \ -DTHREADS_PTHREAD_ARG=-pthread \ -DCMAKE_INSTALL_PREFIX=/usr/local/frc \ @@ -230,7 +230,7 @@ build_static_wpilib() { -DWITH_SIMULATION_MODULES=OFF \ -DWPILIB_TARGET_WARNINGS=-Wno-maybe-uninitialized \ -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_TOOLCHAIN_FILE=${ROOTFS_DIR}/usr/src/opencv-4.8.0/platforms/linux/aarch64-gnu.toolchain.cmake \ + -DCMAKE_TOOLCHAIN_FILE=${ROOTFS_DIR}/usr/src/opencv-4.10.0/platforms/linux/aarch64-gnu.toolchain.cmake \ -DARM_LINUX_SYSROOT=${ROOTFS_DIR} \ -DCMAKE_MODULE_PATH=${SUB_STAGE_DIR}/files \ -DOpenCV_DIR=${ROOTFS_DIR}/usr/local/frc/share/OpenCV \ @@ -269,8 +269,8 @@ sed -i -e 's, -L/pi-gen[^ ]*,,g' "${ROOTFS_DIR}/usr/local/frc-static/lib/pkgconf popd -ROBOTPY_REPO=https://frcmaven.wpi.edu/api/download/wpilib-python-release-2024 -ROBOTPY_VERSION=2024.3.1.0 +ROBOTPY_REPO=https://frcmaven.wpi.edu/api/download/wpilib-python-release-2025 +ROBOTPY_VERSION=2025.2.1 ROBOTPY_ARCH=aarch64 on_chroot << EOF