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:
Noel Eck
2017-06-08 13:50:09 -07:00
parent b55501e327
commit 0223cd2b85
184 changed files with 4462 additions and 1099 deletions

View File

@ -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;
}