Fix mini-epaper-s3 build: resolve SensorLib isBitSet macro conflict with SparkFun MMC5983MA#10584
Merged
Merged
Conversation
SensorLib 0.3.4 defines isBitSet as a C preprocessor macro in SensorLib.h, which conflicts with SparkFun_MMC5983MA_IO.h's class method of the same name. When both libraries are included in the same translation unit (e.g., via configuration.h → SensorRtcHelper.hpp → SensorLib chain, alongside the SparkFun MMC5983MA library in lib_deps), the macro expansion causes compile errors like 'expected unqualified-id before const'. Fix: undefine the isBitSet macro right after including SensorRtcHelper.hpp in configuration.h, so it doesn't interfere with SparkFun's class method.
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job build-esp32s3
Fix mini-epaper-s3 build: resolve SensorLib May 30, 2026
isBitSet macro conflict with SparkFun MMC5983MA
thebentern
pushed a commit
that referenced
this pull request
May 30, 2026
… with SparkFun MMC5983MA (#10584) * Initial plan * Fix SensorLib isBitSet macro conflict with SparkFun MMC5983MA library SensorLib 0.3.4 defines isBitSet as a C preprocessor macro in SensorLib.h, which conflicts with SparkFun_MMC5983MA_IO.h's class method of the same name. When both libraries are included in the same translation unit (e.g., via configuration.h → SensorRtcHelper.hpp → SensorLib chain, alongside the SparkFun MMC5983MA library in lib_deps), the macro expansion causes compile errors like 'expected unqualified-id before const'. Fix: undefine the isBitSet macro right after including SensorRtcHelper.hpp in configuration.h, so it doesn't interfere with SparkFun's class method. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Evil8it
pushed a commit
to Evil8it/ME4TACTNK
that referenced
this pull request
Jun 10, 2026
… with SparkFun MMC5983MA (meshtastic#10584) * Initial plan * Fix SensorLib isBitSet macro conflict with SparkFun MMC5983MA library SensorLib 0.3.4 defines isBitSet as a C preprocessor macro in SensorLib.h, which conflicts with SparkFun_MMC5983MA_IO.h's class method of the same name. When both libraries are included in the same translation unit (e.g., via configuration.h → SensorRtcHelper.hpp → SensorLib chain, alongside the SparkFun MMC5983MA library in lib_deps), the macro expansion causes compile errors like 'expected unqualified-id before const'. Fix: undefine the isBitSet macro right after including SensorRtcHelper.hpp in configuration.h, so it doesn't interfere with SparkFun's class method. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
raghumad
pushed a commit
to raghumad/mezulla-firmware
that referenced
this pull request
Jun 25, 2026
… with SparkFun MMC5983MA (meshtastic#10584) * Initial plan * Fix SensorLib isBitSet macro conflict with SparkFun MMC5983MA library SensorLib 0.3.4 defines isBitSet as a C preprocessor macro in SensorLib.h, which conflicts with SparkFun_MMC5983MA_IO.h's class method of the same name. When both libraries are included in the same translation unit (e.g., via configuration.h → SensorRtcHelper.hpp → SensorLib chain, alongside the SparkFun MMC5983MA library in lib_deps), the macro expansion causes compile errors like 'expected unqualified-id before const'. Fix: undefine the isBitSet macro right after including SensorRtcHelper.hpp in configuration.h, so it doesn't interfere with SparkFun's class method. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
build (mini-epaper-s3, esp32s3)CI job was failing becauseSensorLibv0.3.4 definesisBitSetas a C preprocessor macro inSensorLib.h, which collides with a class method of the same name inSparkFun_MMC5983MA_IO.h. When both libraries appear inlib_deps, the macro expands inside the SparkFun class declaration, producingerror: expected unqualified-id before 'const'.Root Cause
The include chain
configuration.h→SensorRtcHelper.hpp→ … →SensorLib.hputs the macro into scope beforeSparkFun_MMC5983MA_IO.his processed:Fix
Added
#undef isBitSetinside theSensorRtcHelper.hppconditional block inconfiguration.h, immediately after the include:isBitSetis not used directly anywhere in the firmware source, so this is safe across all targets.🤝 Attestations