adafruit / Adafruit_CircuitPython_SCD30

Helper library for the SCD30 e-CO2 sensor
MIT License
15 stars 10 forks source link

Maybe we can have a dummy start_periodic_measurement() function #27

Open dglaude opened 2 years ago

dglaude commented 2 years ago

SCD4x library has a function:

    def start_periodic_measurement(self):
        """Put sensor into working mode, about 5s per measurement"""
        self._send_command(_SCD4X_STARTPERIODICMEASUREMENT)

When porting code from SCD4x to SCD30 you have to wonder about this. Maybe we could have a dummy function that has that name but does nothing:

    def start_periodic_measurement(self):
        """Dummy function for forward compatibility with SCD4x library"""
        pass

This would permit the same code (almost) to work on both kind of sensor.