Skip to content
Snippets Groups Projects
Commit ea9596ec authored by Reinhold Kainhofer's avatar Reinhold Kainhofer Committed by user2684
Browse files

Optimize MQ sensors (share default curve coefficients) (#162)

* Fix compilation and other issues

-) Enums (in particular the sensor types) start with 0, so we have to allow a sensor type of 0
-) Add missing SensorMQ::setTargetGas method
-) Make gas type identifiers for MQ sensors const static to preserve 6 bytes of memory per MQ instance

* Fix wrong array index (typo)

* Optimize the MQ sensors by using one static array for the default curve coefficients. This adds three extra pointers, but saves 48 bytes for each additional MQ sensor after the first
parent 1087ba0c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment