Skip to content
  • Reinhold Kainhofer's avatar
    Optimize MQ sensors (share default curve coefficients) (#162) · ea9596ec
    Reinhold Kainhofer authored
    * 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
    ea9596ec