mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 09:51:14 +03:00
C++ Core: Add base class per sensor/actuator type
Adding base classes for UPM sensors and actuators. Signed-off-by: Noel Eck <noel.eck@intel.com>
This commit is contained in:
@ -54,3 +54,17 @@ void BME280::setOversampleRateHumidity(BME280_OSRS_H_T rate)
|
||||
{
|
||||
bmp280_set_oversample_rate_humidity(m_bmp280, rate);
|
||||
}
|
||||
|
||||
std::map<std::string, float> BME280::HumidityForSources(std::vector<std::string> sources)
|
||||
{
|
||||
std::map<std::string, float> ret;
|
||||
|
||||
if (std::find(sources.begin(), sources.end(), "humidity") != sources.end())
|
||||
{
|
||||
update();
|
||||
ret["humidity"] = getHumidity();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user