Lines Matching +full:gain +full:- +full:offset
11 #include <phosphor-logging/elog-errors.hpp>
50 auto gain = env::getEnv("GAIN", sensor); in Sensor() local
51 if (!gain.empty()) in Sensor()
53 _sensorAdjusts.gain = std::stod(gain); in Sensor()
56 auto offset = env::getEnv("OFFSET", sensor); in Sensor() local
57 if (!offset.empty()) in Sensor()
59 _sensorAdjusts.offset = std::stoi(offset); in Sensor()
107 // Adjust based on gain and offset in adjustValue()
109 static_cast<double>(value) * _sensorAdjusts.gain + in adjustValue()
110 _sensorAdjusts.offset); in adjustValue()
137 if (statusIface->functional()) in addValue()
162 val = _ioAccess->read( in addValue()
175 statusIface->functional(false); in addValue()
186 iface->unit(hwmon::getUnit(attrs)); in addValue()
192 iface->value(val); in addValue()
197 iface->maxValue(std::stoll(maxValue)); in addValue()
202 iface->minValue(std::stoll(minValue)); in addValue()
224 sysfs::make_sysfs_path(_ioAccess->path(), faultName, faultID, entry); in addStatus()
230 uint32_t fault = _ioAccess->read(faultName, faultID, entry, in addStatus()
258 iface->functional(functional); in addStatus()
275 iface->accuracy(accuracy); in addAccuracy()
291 iface->priority(priority); in addPriority()
299 handle->setValues({0}); in gpioLock()
309 handle->setValues({1}); in gpioUnlock()
339 // on subsequent reads - proceed to check the future_status to see when in asyncRead()
342 asyncThread = std::move(asyncIter->second); in asyncRead()