Skip to content

Commit 3885091

Browse files
committed
pybricks.ev3devices.InfraredSensor: Fix keypad returning wrong button.
1 parent 52f11d6 commit 3885091

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
[Unreleased]: https://github.com/pybricks/pybricks-micropython/compare/v4.0.0b11...HEAD
88

9+
### Fixed
10+
- Fixed button `LEFT_DOWN` returning `LEFT_UP` in the method
11+
`ev3devices.InfraredSensor.keypad()` ([support#2724]).
12+
913
## [4.0.0b11] - 2026-05-30
1014

1115
### Added

pybricks/ev3devices/pb_type_ev3devices_infraredsensor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static mp_obj_t ev3devices_InfraredSensor_keypad(mp_obj_t self_in) {
167167
pressed[len++] = pb_type_button_new(MP_QSTR_LEFT_UP);
168168
}
169169
if (keypad_data & 0x20) {
170-
pressed[len++] = pb_type_button_new(MP_QSTR_LEFT_UP);
170+
pressed[len++] = pb_type_button_new(MP_QSTR_LEFT_DOWN);
171171
}
172172
if (keypad_data & 0x40) {
173173
pressed[len++] = pb_type_button_new(MP_QSTR_RIGHT_UP);

0 commit comments

Comments
 (0)