Skip to content

Commit 4a4714a

Browse files
committed
pbio/port_lump: Revert setting EV3 Color Sensor ambient mode.
This was added in 91acfb3 to get the sensor going. Since 6c5c1f0, we are doing it by sending a keep-alive message, so we don't need to set any mode on this sensor. It seems better to stick to the default reflection mode.
1 parent 6c5c1f0 commit 4a4714a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/pbio/src/port_lump.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -881,8 +881,6 @@ pbio_error_t pbio_port_lump_sync_thread(pbio_os_state_t *state, pbio_port_lump_d
881881
default_mode = LEGO_DEVICE_MODE_PUP_REL_MOTOR__POS;
882882
} else if (lump_dev->type_id == LEGO_DEVICE_TYPE_ID_COLOR_DIST_SENSOR) {
883883
default_mode = LEGO_DEVICE_MODE_PUP_COLOR_DISTANCE_SENSOR__RGB_I;
884-
} else if (lump_dev->type_id == LEGO_DEVICE_TYPE_ID_EV3_COLOR_SENSOR) {
885-
default_mode = LEGO_DEVICE_MODE_EV3_COLOR_SENSOR__AMBIENT;
886884
}
887885
if (default_mode) {
888886
pbio_port_lump_request_mode(lump_dev, default_mode);
@@ -1014,7 +1012,7 @@ pbio_error_t pbio_port_lump_data_recv_thread(pbio_os_state_t *state, pbio_port_l
10141012

10151013
lump_dev->rx_msg_size = ev3_uart_get_msg_size(lump_dev->rx_msg[0]);
10161014
if (lump_dev->rx_msg_size < 3 || lump_dev->rx_msg_size > EV3_UART_MAX_MESSAGE_SIZE) {
1017-
debug_pr("Bad data message size %d\n", lump_dev->rx_msg_size);
1015+
debug_pr("Bad data message size\n");
10181016
continue;
10191017
}
10201018

0 commit comments

Comments
 (0)