Skip to content

Commit

Permalink
SHT2x: add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
winkj committed Nov 8, 2024
1 parent bcae2b6 commit 96076e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SHTSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ class SHT2xSensor : public SHTI2cSensor
// have to read from I2C two times with EXPECTED_DATA_SIZE / 2

// read T from SHT2x Sensor
// Upper byte is T for SHT2x Sensors
// Upper byte of 'mI2cCommand' is T for SHT2x Sensors
cmd[0] = mI2cCommand >> 8;
if (!readFromI2c(mWire, mI2cAddress, cmd, mCmd_Size, data,
EXPECTED_DATA_SIZE / 2, mDuration)) {
Expand All @@ -195,7 +195,7 @@ class SHT2xSensor : public SHTI2cSensor
}

// read RH from SHT2x Sensor
// Lower byte is RH for SHT2x Sensors
// Lower byte of 'mI2cCommand' is RH for SHT2x Sensors
cmd[0] = mI2cCommand & 0xff;
if (!readFromI2c(mWire, mI2cAddress, cmd, mCmd_Size, &data[3],
EXPECTED_DATA_SIZE / 2, mDuration)) {
Expand Down

0 comments on commit 96076e4

Please sign in to comment.