Skip to content

Commit 533b9eb

Browse files
committed
added check on header include -- to make sure BOSCH SDK is installed
1 parent 390f4d5 commit 533b9eb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/sfTk/sfDevBMV080.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@
1616
* @see sfDevBMV080.h
1717
*/
1818

19+
#if __has_include("bmv080.h")
1920
#include "bmv080.h"
2021
#include "bmv080_defs.h"
22+
#else
23+
#error \
24+
"BOSCH BMV080 SDK Must be installed. See instructions at www.github.com/sparkfun/SparkFun_BMV080_Arduino_Library - ERROR: bmv080.h not found"
25+
26+
#endif
27+
2128
#include "sfDevBMV080.h"
2229

2330
// need our bus I2C type for some I2C specific features

src/sfTk/sfDevBMV080.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,14 @@
1818

1919
#pragma once
2020

21+
#if __has_include("bmv080.h")
2122
#include "bmv080.h"
2223
#include "bmv080_defs.h"
24+
#else
25+
#error \
26+
"BOSCH BMV080 SDK Must be installed. See instructions at www.github.com/sparkfun/SparkFun_BMV080_Arduino_Library - ERROR: bmv080.h not found"
27+
28+
#endif
2329

2430
// Include the platform independent layer of the SparkFun Toolkit
2531
#include <sfTk/sfTkIBus.h>
@@ -119,10 +125,10 @@ class sfDevBMV080
119125
*
120126
* @return true if the sensor was successfully closed and handle created
121127
* @return false if the sensor could not be closed or handle creation failed
122-
*
128+
*
123129
* @see open()
124130
*/
125-
bool close(void);
131+
bool close(void);
126132

127133
/**
128134
* @brief Resets the BMV080 sensor to its default state

0 commit comments

Comments
 (0)