diff --git a/.drone.yml b/.drone.yml
index f935d15..8f769f8 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -8,7 +8,7 @@ pipeline:
commands:
- curl https://apt.matrix.one/doc/apt-key.gpg | apt-key add -
- apt-get update
- - apt-get install --yes libfftw3-dev wiringpi libgflags-dev
+ - apt-get install --yes libfftw3-dev libgpiod-dev libgflags-dev
- debuild -us -uc -b
- mv ../*.deb .
diff --git a/README.md b/README.md
index 84a3c8e..5d11cc0 100644
--- a/README.md
+++ b/README.md
@@ -37,7 +37,7 @@ sudo apt-get update
sudo apt-get upgrade
# Install MATRIX HAL Packages and Build Prerequisites
-sudo apt-get install cmake g++ git libfftw3-dev wiringpi libgflags-dev matrixio-creator-init
+sudo apt-get install cmake g++ git libfftw3-dev libgpiod-dev libgflags-dev matrixio-creator-init
# Reboot your Pi
sudo reboot
diff --git a/cpp/driver/CMakeLists.txt b/cpp/driver/CMakeLists.txt
index 026399a..1fef715 100644
--- a/cpp/driver/CMakeLists.txt
+++ b/cpp/driver/CMakeLists.txt
@@ -4,11 +4,12 @@ cmake_minimum_required(VERSION 2.8)
set(CMAKE_BUILD_TYPE Release)
find_library (FFTW_LIBRARIES NAMES fftw3f )
-FIND_LIBRARY(WIRINGPI_LIB NAMES wiringPi)
-FIND_LIBRARY(WIRINGPI_DEV_LIB NAMES wiringPiDev)
+find_package(PkgConfig REQUIRED)
+pkg_check_modules(GPIODCXX REQUIRED gpiodcxx)
FIND_LIBRARY(CRYPT_LIB NAMES crypt)
-add_compile_options(-std=c++11)
+set(CMAKE_CXX_STANDARD 17)
+set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Enable extra warnings. Not needed.
include (../../cmake/FatalWarnings.cmake)
@@ -18,6 +19,7 @@ find_package(Threads)
include_directories(
../..
+ ${GPIODCXX_INCLUDE_DIRS}
)
set(matrix_creator_hal_src
@@ -43,10 +45,10 @@ set(matrix_creator_hal_src
)
add_library(matrix_creator_hal SHARED ${matrix_creator_hal_src})
- set_property(TARGET matrix_creator_hal PROPERTY CXX_STANDARD 11)
+ set_property(TARGET matrix_creator_hal PROPERTY CXX_STANDARD 17)
target_link_libraries(matrix_creator_hal ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(matrix_creator_hal ${FFTW_LIBRARIES})
- target_link_libraries(matrix_creator_hal ${WIRINGPI_LIB} ${WIRINGPI_DEV_LIB} ${CRYPT_LIB})
+ target_link_libraries(matrix_creator_hal ${GPIODCXX_LIBRARIES} ${CRYPT_LIB})
set (matrix_creator_hal_headers
circular_queue.h
diff --git a/cpp/driver/microphone_array.cpp b/cpp/driver/microphone_array.cpp
index 1a6d28a..cf83a6e 100644
--- a/cpp/driver/microphone_array.cpp
+++ b/cpp/driver/microphone_array.cpp
@@ -15,9 +15,7 @@
* along with this program. If not, see .
*/
-#include
#include
-#include
#include
#include
#include
@@ -25,20 +23,16 @@
#include