17 namespace duds {
namespace hardware {
namespace devices {
namespace instruments {
40 std::unique_ptr<duds::hardware::interface::Smbus>
com;
54 std::uint16_t broad,
ir;
71 void startOrStop(
int val);
81 APDS9301(std::unique_ptr<duds::hardware::interface::Smbus> &c);
96 void init(
float integration,
bool hGain);
178 #endif // #ifndef APDS9301_HPP A container for a value and a unit to better describe the value.
Base class for all APDS9301 specific errors.
std::unique_ptr< duds::hardware::interface::Smbus > com
The SMBus communication interface.
unsigned int hGain
High gain (16x) flag.
float period() const
Returns the sampling period configured for the device.
An invalid integration time was specified.
std::uint16_t brightnessIrCount() const
The value reported by the device for the infrared brightness.
float actualPeriod
Configured integration time.
The base type for errors from devices.
A quick try at supporting APDS9301 brightness sensor; will change significantly in the future...
float scale
Multiplier applied to the sample results to account for different integration times and gain setting ...
unsigned int integTime
Integration time value used in device configuration register.
std::uint16_t brightnessCount() const
The value reported by the device for the broad spectrum brightness.
bool highGain() const
Returns true if the device has been configured to use its 16x gain function by a previous call to ini...