From 65e73ff347b4f3b099120bd03e0a19b64dabd42f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 04:59:31 +0000 Subject: [PATCH 01/10] Initial plan From 3f8ad3d579201c3dc6003849af19afad2f41b42e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 05:02:11 +0000 Subject: [PATCH 02/10] Add sanity build CI workflow for Debian Bookworm x64 Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com> --- .github/workflows/sanity-build.yml | 51 ++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/sanity-build.yml diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml new file mode 100644 index 0000000..b7480e3 --- /dev/null +++ b/.github/workflows/sanity-build.yml @@ -0,0 +1,51 @@ +name: Sanity Build (Debian Bookworm x64) + +on: + push: + branches: [main] + pull_request: + +jobs: + sanity-build: + name: Sanity Build + runs-on: ubuntu-latest + container: + image: debian:bookworm + + steps: + - name: Install dependencies + run: | + apt-get update + apt-get install -y --no-install-recommends \ + build-essential cmake git pkg-config \ + libserial-dev libgpiod-dev libzmq3-dev \ + libpistache-dev rapidjson-dev \ + libcamera-dev libopencv-dev + + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build - mandeye-standard-rpi4.h + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release \ + -DMANDEYE_HARDWARE_HEADER=mandeye-standard-rpi4.h + cmake --build build -j$(nproc) + + - name: Build - mandeye-standard-rpi5.h + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release \ + -DMANDEYE_HARDWARE_HEADER=mandeye-standard-rpi5.h + cmake --build build -j$(nproc) + + - name: Build - mandeye-pro-cm4-bookworm.h + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release \ + -DMANDEYE_HARDWARE_HEADER=mandeye-pro-cm4-bookworm.h + cmake --build build -j$(nproc) + + - name: Build - mandeye-direct-cm5.h + run: | + cmake -B build -DCMAKE_BUILD_TYPE=Release \ + -DMANDEYE_HARDWARE_HEADER=mandeye-direct-cm5.h + cmake --build build -j$(nproc) From 248d12573d6825bac36342efbef9180b71fbfe2d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 05:04:05 +0000 Subject: [PATCH 03/10] Apply code review: quiet apt output and restrict GITHUB_TOKEN permissions Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com> --- .github/workflows/sanity-build.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index b7480e3..1010129 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -9,14 +9,16 @@ jobs: sanity-build: name: Sanity Build runs-on: ubuntu-latest + permissions: + contents: read container: image: debian:bookworm steps: - name: Install dependencies run: | - apt-get update - apt-get install -y --no-install-recommends \ + apt-get update -qq + apt-get install -y -qq --no-install-recommends \ build-essential cmake git pkg-config \ libserial-dev libgpiod-dev libzmq3-dev \ libpistache-dev rapidjson-dev \ From 00f249b23e3da0b25838b771d171aabbc9805012 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 05:48:45 +0000 Subject: [PATCH 04/10] Add ca-certificates and update-ca-certificates before checkout Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com> --- .github/workflows/sanity-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index 1010129..c77201e 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -19,10 +19,11 @@ jobs: run: | apt-get update -qq apt-get install -y -qq --no-install-recommends \ - build-essential cmake git pkg-config \ + build-essential cmake git pkg-config ca-certificates \ libserial-dev libgpiod-dev libzmq3-dev \ libpistache-dev rapidjson-dev \ libcamera-dev libopencv-dev + update-ca-certificates - uses: actions/checkout@v4 with: From e5c168cb0d4eae1c3cc1ca4f1e9957fbb2483159 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 23:35:39 +0000 Subject: [PATCH 05/10] Skip sdk-extensions: use non-recursive submodule checkout Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com> Agent-Logs-Url: https://github.com/JanuszBedkowski/mandeye_controller/sessions/6179ac3c-751a-40bc-acdf-e0986c641925 --- .github/workflows/sanity-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index c77201e..4ff92df 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v4 with: - submodules: recursive + submodules: true - name: Build - mandeye-standard-rpi4.h run: | From 0ecfbbb2d4e89bddcce695a88ec182536cdb6ebc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 00:06:55 +0000 Subject: [PATCH 06/10] Add missing nlohmann-json3-dev package to CI dependencies Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com> Agent-Logs-Url: https://github.com/JanuszBedkowski/mandeye_controller/sessions/a9bded99-f086-4c67-9f35-9638556702f5 --- .github/workflows/sanity-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index 4ff92df..7ec3bd1 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -21,7 +21,7 @@ jobs: apt-get install -y -qq --no-install-recommends \ build-essential cmake git pkg-config ca-certificates \ libserial-dev libgpiod-dev libzmq3-dev \ - libpistache-dev rapidjson-dev \ + libpistache-dev rapidjson-dev nlohmann-json3-dev \ libcamera-dev libopencv-dev update-ca-certificates From 3e343e022e317451a5dc63de19e15ac03458c4dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pe=C5=82ka?= Date: Sat, 21 Mar 2026 01:17:27 +0100 Subject: [PATCH 07/10] only 5 --- .github/workflows/sanity-build.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index 7ec3bd1..dd8d3a3 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -29,24 +29,12 @@ jobs: with: submodules: true - - name: Build - mandeye-standard-rpi4.h - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release \ - -DMANDEYE_HARDWARE_HEADER=mandeye-standard-rpi4.h - cmake --build build -j$(nproc) - - name: Build - mandeye-standard-rpi5.h run: | cmake -B build -DCMAKE_BUILD_TYPE=Release \ -DMANDEYE_HARDWARE_HEADER=mandeye-standard-rpi5.h cmake --build build -j$(nproc) - - name: Build - mandeye-pro-cm4-bookworm.h - run: | - cmake -B build -DCMAKE_BUILD_TYPE=Release \ - -DMANDEYE_HARDWARE_HEADER=mandeye-pro-cm4-bookworm.h - cmake --build build -j$(nproc) - - name: Build - mandeye-direct-cm5.h run: | cmake -B build -DCMAKE_BUILD_TYPE=Release \ From 3950539a5568aebeac23e1a42996de36c6a48265 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 21 Mar 2026 22:06:48 +0000 Subject: [PATCH 08/10] Fix C++ compile errors (circular include, missing string header, LED enum, GetGPIOChip namespace, syncOuts typo) Co-authored-by: michalpelka <3209244+michalpelka@users.noreply.github.com> Agent-Logs-Url: https://github.com/JanuszBedkowski/mandeye_controller/sessions/12562d35-d779-477a-be80-8ea33df512c2 --- code/fake_pps.cpp | 4 ++-- code/gpios.cpp | 2 +- code/hardware_config/hardware_common.h | 5 ++++- code/state.h | 1 + extras/FakePPS/main.cpp | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/code/fake_pps.cpp b/code/fake_pps.cpp index a5089c4..1700db2 100644 --- a/code/fake_pps.cpp +++ b/code/fake_pps.cpp @@ -87,7 +87,7 @@ void oneSecondThread() serialPorts.emplace_back(std::move(serialPort)); } const auto ouputs = hardware::GetLidarSyncGPIO(); - const auto& chipPath = mandeye::GetGPIOChip(); + const auto& chipPath = hardware::GetGPIOChip(); std::cout << "Opening GPIO chip " << chipPath << std::endl; gpiod_chip* chip = gpiod_chip_open(chipPath); @@ -115,7 +115,7 @@ void oneSecondThread() } syncOutsLines.emplace_back(line); } - assert(serialPorts.size() == syncOuts.size()); + assert(serialPorts.size() == syncOutsLines.size()); //setup pps gpio constexpr uint64_t Rate = 1000; diff --git a/code/gpios.cpp b/code/gpios.cpp index 1486a88..af2a1e7 100644 --- a/code/gpios.cpp +++ b/code/gpios.cpp @@ -47,7 +47,7 @@ GpioClient::GpioClient(bool sim) if(!sim) { - const auto& chipPath = mandeye::GetGPIOChip(); + const auto& chipPath = hardware::GetGPIOChip(); std::cout << "Opening GPIO chip " << chipPath << std::endl; m_chip = gpiod_chip_open(chipPath); diff --git a/code/hardware_config/hardware_common.h b/code/hardware_config/hardware_common.h index 68e8a2c..8d0d68d 100644 --- a/code/hardware_config/hardware_common.h +++ b/code/hardware_config/hardware_common.h @@ -1,5 +1,4 @@ #pragma once -#include "gpios.h" #include "state.h" #include @@ -11,6 +10,8 @@ enum class LED LED_GPIO_COPY_DATA, LED_GPIO_CONTINOUS_SCANNING, BUZZER, + LIDAR_SYNC_1, + LIDAR_SYNC_2, }; enum class BUTTON @@ -29,3 +30,5 @@ enum class GPIO_PULL OFF }; }; + +#include "gpios.h" diff --git a/code/state.h b/code/state.h index ff6d3c9..5a55990 100644 --- a/code/state.h +++ b/code/state.h @@ -1,5 +1,6 @@ #pragma once #include +#include namespace mandeye { enum class States diff --git a/extras/FakePPS/main.cpp b/extras/FakePPS/main.cpp index 80476cb..01a09ea 100644 --- a/extras/FakePPS/main.cpp +++ b/extras/FakePPS/main.cpp @@ -88,7 +88,7 @@ void oneSecondThread() serialPorts.emplace_back(std::move(serialPort)); } const auto ouputs = hardware::GetLidarSyncGPIO(); - const auto& chipPath = mandeye::GetGPIOChip(); + const auto& chipPath = hardware::GetGPIOChip(); std::cout << "Opening GPIO chip " << chipPath << std::endl; gpiod_chip* chip = gpiod_chip_open(chipPath); From 7598141aa21af708a7b8d7eb179d2c4d184f14fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pe=C5=82ka?= Date: Sun, 22 Mar 2026 06:43:28 +0100 Subject: [PATCH 09/10] Apply suggestion from @michalpelka --- .github/workflows/sanity-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index dd8d3a3..73d78b1 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -21,7 +21,7 @@ jobs: apt-get install -y -qq --no-install-recommends \ build-essential cmake git pkg-config ca-certificates \ libserial-dev libgpiod-dev libzmq3-dev \ - libpistache-dev rapidjson-dev nlohmann-json3-dev \ + libpistache-dev rapidjson-dev nlohmann-json3-dev libzmq3-dev cppzmq-dev \ libcamera-dev libopencv-dev update-ca-certificates From 631cad3313980a2bb00a4bda7a648e654bb121b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pe=C5=82ka?= Date: Sun, 22 Mar 2026 21:44:34 +0100 Subject: [PATCH 10/10] Update .github/workflows/sanity-build.yml --- .github/workflows/sanity-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-build.yml b/.github/workflows/sanity-build.yml index 73d78b1..3f5fb75 100644 --- a/.github/workflows/sanity-build.yml +++ b/.github/workflows/sanity-build.yml @@ -21,7 +21,7 @@ jobs: apt-get install -y -qq --no-install-recommends \ build-essential cmake git pkg-config ca-certificates \ libserial-dev libgpiod-dev libzmq3-dev \ - libpistache-dev rapidjson-dev nlohmann-json3-dev libzmq3-dev cppzmq-dev \ + libpistache-dev rapidjson-dev nlohmann-json3-dev libzmq3-dev cppzmq-dev libtime-dev \ libcamera-dev libopencv-dev update-ca-certificates