Skip to content

Commit 129775f

Browse files
Fix board identification
1 parent 3919f04 commit 129775f

File tree

1 file changed

+2
-2
lines changed
  • internal_filesystem/lib/mpos

1 file changed

+2
-2
lines changed

internal_filesystem/lib/mpos/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
elif sys.platform == "esp32":
1616
from machine import Pin, I2C
1717
i2c0 = I2C(0, sda=Pin(48), scl=Pin(47))
18-
if i2c0.scan() == [21, 107]: # touch screen and IMU
18+
if {0x15, 0x6B} <= set(i2c0.scan()): # touch screen and IMU (at least, possibly more)
1919
board = "waveshare_esp32_s3_touch_lcd_2"
2020
else:
2121
i2c0 = I2C(0, sda=Pin(9), scl=Pin(18))
22-
if i2c0.scan() == [107]: # only IMU
22+
if {0x6B} <= set(i2c0.scan()): # IMU (plus possibly the Communicator's LANA TNY at 0x38)
2323
board = "fri3d_2024"
2424
else:
2525
print("Unable to identify board, defaulting...")

0 commit comments

Comments
 (0)