Skip to content

Commit 65578b5

Browse files
committed
Set proximity as well using data[0]
1 parent cc1cbc6 commit 65578b5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/i2c/WipperSnapper_I2C.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1260,7 +1260,8 @@ void WipperSnapper_Component_I2C::sensorEventRead(
12601260
WS_DEBUG_PRINTLN(unit);
12611261

12621262
// pack event data into msg
1263-
if (sensorType == wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW) {
1263+
if (sensorType == wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_RAW ||
1264+
sensorType == wippersnapper_i2c_v1_SensorType_SENSOR_TYPE_PROXIMITY) {
12641265
fillEventMessage(msgi2cResponse, event.data[0], sensorType);
12651266
} else {
12661267
fillEventMessage(msgi2cResponse, event.*valueMember, sensorType);

0 commit comments

Comments
 (0)