Merge pull request #10715 from fablabbcn/bugfix/detection-on-0x69-address

Fixes on 0x69 address detection
This commit is contained in:
oscgonfer
2026-07-03 15:55:54 +02:00
committed by GitHub
6 changed files with 35 additions and 64 deletions
@@ -39,4 +39,4 @@ class PMSA003ISensor : public TelemetrySensor
#endif
};
#endif
#endif
+1 -1
View File
@@ -52,4 +52,4 @@ class SCD30Sensor : public TelemetrySensor
meshtastic_AdminMessage *response) override;
};
#endif
#endif
+1 -1
View File
@@ -62,4 +62,4 @@ class SCD4XSensor : public TelemetrySensor
meshtastic_AdminMessage *response) override;
};
#endif
#endif
@@ -75,6 +75,24 @@ bool SEN5XSensor::findModel()
return true;
}
bool SEN5XSensor::probe(TwoWire *bus, uint8_t address, ScanI2C::I2CPort port)
{
LOG_INFO("SEN5X: probing sensor");
_bus = bus;
_address = address;
#ifdef SEN5X_I2C_CLOCK_SPEED
_port = port;
reClockI2C.setup(_bus, _port);
#endif /* SEN5X_I2C_CLOCK_SPEED */
if (!findModel()) {
LOG_DEBUG("SEN5X: can't find SEN5X model");
return false;
}
return true;
}
bool SEN5XSensor::sendCommand(uint16_t command)
{
uint8_t nothing;
+2 -1
View File
@@ -155,6 +155,7 @@ See: https://sensirion.com/resource/application_note/low_power_mode/sen5x
public:
SEN5XSensor();
bool probe(TwoWire *bus, uint8_t address, ScanI2C::I2CPort port);
virtual bool initDevice(TwoWire *bus, ScanI2C::FoundDevice *dev) override;
virtual bool getMetrics(meshtastic_Telemetry *measurement) override;
@@ -169,4 +170,4 @@ See: https://sensirion.com/resource/application_note/low_power_mode/sen5x
meshtastic_AdminMessage *response) override;
};
#endif
#endif