Sensirion / arduino-i2c-scd4x

Arduino library for Sensirion SCD4x sensors
BSD 3-Clause "New" or "Revised" License
48 stars 19 forks source link

Blocking Operation of Single Shot Measurement Now Optional #36

Closed ab-tools closed 1 month ago

ab-tools commented 1 month ago

Hello,

it is very inconvenient that this library enforces a 5 sec. blocking delay when performing a single shot measurement.

It is understood that you need to wait for 5 sec. till the measurement results are available, but this can be done in the calling application in a non-blocking fashion.

I've therefore added a parameter which allows non-blocking operation of the single shot measurement method with blocking mode being the default - so no behavior change for existent applications.

Best regards Andreas

psachs commented 1 month ago

I agree, blocking for 5 seconds is way to long. There should be a non-blocking option as well. Thanks a lot for your contribution.

ab-tools commented 1 month ago

Thanks, Pascal, appreciating your quick feedback and merge!