LTR390 - Multiple bugfixes (#6161)

This commit is contained in:
Stephen Tierney
2024-02-21 15:10:04 +11:00
committed by GitHub
parent d96090095a
commit e847039ffd
3 changed files with 29 additions and 21 deletions
+1 -8
View File
@@ -17,14 +17,6 @@ enum LTR390CTRL {
};
// enums from https://github.com/adafruit/Adafruit_LTR390/
static const uint8_t LTR390_MAIN_CTRL = 0x00;
static const uint8_t LTR390_MEAS_RATE = 0x04;
static const uint8_t LTR390_GAIN = 0x05;
static const uint8_t LTR390_PART_ID = 0x06;
static const uint8_t LTR390_MAIN_STATUS = 0x07;
static const float LTR390_SENSITIVITY = 2300.0;
// Sensing modes
enum LTR390MODE {
LTR390_MODE_ALS,
@@ -81,6 +73,7 @@ class LTR390Component : public PollingComponent, public i2c::I2CDevice {
LTR390GAIN gain_;
LTR390RESOLUTION res_;
float sensitivity_;
float wfac_;
sensor::Sensor *light_sensor_{nullptr};