Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/ocs_sensor/sht4x/sensor_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SensorPipeline::SensorPipeline(io::i2c::IStore& store,
configASSERT(storage_);

transceiver_ = store.add(transceiver_id_.c_str(), io::i2c::AddressLength::Bit_7,
params.i2c_addr, io::i2c::TransferSpeed::Fast);
params.i2c_addr, params.i2c_speed);
configASSERT(transceiver_);

sensor_.reset(new (std::nothrow) Sensor(*transceiver_, *storage_, id, params.sensor));
Expand Down
5 changes: 4 additions & 1 deletion components/ocs_sensor/sht4x/sensor_pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ class SensorPipeline : private core::NonCopyable<> {
//! Various pipeline settings.
struct Params {
//! Sensor I2C address.
uint8_t i2c_addr { 0x44 };
io::i2c::Address i2c_addr { 0x44 };

//! Transfer speed for I2C communication.
io::i2c::TransferSpeed i2c_speed { io::i2c::TransferSpeed::Fast };

//! How often to read data from the sensor.
system::Time read_interval { 0 };
Expand Down