Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defines are not honored in ino files #36

Open
finitespace opened this issue Oct 11, 2017 · 2 comments
Open

Defines are not honored in ino files #36

finitespace opened this issue Oct 11, 2017 · 2 comments
Labels
Milestone

Comments

@finitespace
Copy link
Owner

finitespace commented Oct 11, 2017

Arduino compiles all of the code in the src file** compiling our brzo and spi code. Arduino compiles files separately and #defines do not transfer across files. Therefore, a #ifdef cannot be used to surround the BME BRZO code. The result, all of the example builds fail if the BRZO code is not surrounded in a pre-processor macro. Likewise, this has caused issues in past I2C builds where #define <SPI.h> was required to build.

Current implementation requires user intervention in library files by modifying BME280I2C_BRZO.cpp::line 35: #define USING_BRZO 1.

**(TODO: check if src folder structure mitigates)

@finitespace finitespace added this to the Version_2.2.1 milestone Oct 11, 2017
@finitespace finitespace changed the title Header defines are not honored in ino files Defines are not honored in ino files Oct 11, 2017
@finitespace
Copy link
Owner Author

This has been solved using a config.h file in the softwarewire branch.

@finitespace
Copy link
Owner Author

Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant