You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a small issue: You code is written very well if only this sensor is used alone. Within a system where multiple sensors and devices need to be handled waiting times for a sensor can lead to multiple problems.
In your interface you have only foreseen as public the methods: readHumidity and readTemperature.
If I want to
trigger a measueremnt
do something else
retrieve data
I would like to call the _readMeasurement(); method. Since this is declard as private I cannot do that even in a derived child class.
I would like to suggest to declare the _readMeasurement(); method as public or as protected. Then a child class could use this method.
Your interface is well prepared for this by using this->readHumidity(AHTXX_USE_READ_DATA);
Thank you again
The text was updated successfully, but these errors were encountered:
Hello,
thank you for sharing this code.
There is a small issue: You code is written very well if only this sensor is used alone. Within a system where multiple sensors and devices need to be handled waiting times for a sensor can lead to multiple problems.
In your interface you have only foreseen as public the methods: readHumidity and readTemperature.
If I want to
I would like to call the _readMeasurement(); method. Since this is declard as private I cannot do that even in a derived child class.
I would like to suggest to declare the _readMeasurement(); method as public or as protected. Then a child class could use this method.
Your interface is well prepared for this by using this->readHumidity(AHTXX_USE_READ_DATA);
Thank you again
The text was updated successfully, but these errors were encountered: