Skip to content
Snippets Groups Projects
Commit d58f2652 authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Add FCSERVER_HAS_WIRINGPI guards in fcserver.cpp

parent a435deb5
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
#include <ctype.h> #include <ctype.h>
#include <iostream> #include <iostream>
#ifdef FCSERVER_HAS_WIRINGPI
#include <wiringPi.h> #include <wiringPi.h>
#include <wiringPiSPI.h> #endif
FCServer::FCServer(rapidjson::Document &config) FCServer::FCServer(rapidjson::Document &config)
: mConfig(config), : mConfig(config),
...@@ -281,7 +282,9 @@ void FCServer::usbDeviceLeft(std::vector<USBDevice*>::iterator iter) ...@@ -281,7 +282,9 @@ void FCServer::usbDeviceLeft(std::vector<USBDevice*>::iterator iter)
bool FCServer::startSPI() bool FCServer::startSPI()
{ {
#ifdef FCSERVER_HAS_WIRINGPI
wiringPiSetup(); wiringPiSetup();
#endif
for (unsigned i = 0; i < mDevices.Size(); ++i) { for (unsigned i = 0; i < mDevices.Size(); ++i) {
const Value &device = mDevices[i]; const Value &device = mDevices[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment