Skip to content
Draft
42 changes: 42 additions & 0 deletions .github/workflows/sanity-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Sanity Build (Debian Bookworm x64)

on:
push:
branches: [main]
pull_request:

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 -qq
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 libtime-dev \
libcamera-dev libopencv-dev
update-ca-certificates

- uses: actions/checkout@v4
with:
submodules: true

- 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-direct-cm5.h
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DMANDEYE_HARDWARE_HEADER=mandeye-direct-cm5.h
cmake --build build -j$(nproc)
4 changes: 2 additions & 2 deletions code/fake_pps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion code/gpios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 4 additions & 1 deletion code/hardware_config/hardware_common.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once
#include "gpios.h"
#include "state.h"
#include <SerialPortConstants.h>

Expand All @@ -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
Expand All @@ -29,3 +30,5 @@ enum class GPIO_PULL
OFF
};
};

#include "gpios.h"
1 change: 1 addition & 0 deletions code/state.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once
#include <map>
#include <string>
namespace mandeye
{
enum class States
Expand Down
2 changes: 1 addition & 1 deletion extras/FakePPS/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading