Skip to content

Use constexpressions instead of #defines in MQ131.h - #62

Merged
ostaquet merged 5 commits into
ostaquet:masterfrom
TheZitroX:patch-1
Jan 2, 2026
Merged

Use constexpressions instead of #defines in MQ131.h#62
ostaquet merged 5 commits into
ostaquet:masterfrom
TheZitroX:patch-1

Conversation

@TheZitroX

Copy link
Copy Markdown
Contributor

Using constant expressions (constexpr) instead of #define to get type-safety.

@ostaquet

ostaquet commented Jan 2, 2026

Copy link
Copy Markdown
Owner

Hi @TheZitroX 👋
Thanks for your contribution (sorry for the delay of merging, I lost track of the time 😢 )
I remove the pragma directive as it seems to cause some issues with Arduino CLI (seen on some forums).
I adjusted the constexpr to keep the exact type and adjust the lines to allow compilation on Arduino IDE (it is a bit less permissive it seems 😅 ).
CU

@ostaquet
ostaquet merged commit 7b2cde8 into ostaquet:master Jan 2, 2026
@TheZitroX

Copy link
Copy Markdown
Contributor Author

Happy new year to you 🎊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants