Move odroid go detection towards the bottom

This commit is contained in:
Thomas Farstrike
2026-02-13 22:47:52 +01:00
parent d2d5d64b6f
commit 74b1a427ce
4 changed files with 10 additions and 7 deletions
@@ -1,5 +1,7 @@
# Hardware initialization for ESP32 M5Stack-Fire board
# Manufacturer's website at https://https://docs.m5stack.com/en/core/fire_v2.7
# Original author: https://github.com/ancebfer
import drivers.display.ili9341 as ili9341
import lcd_bus
import machine
@@ -3,6 +3,7 @@ print("odroid_go.py initialization")
# Hardware initialization for Hardkernel ODROID-Go
# https://github.com/hardkernel/ODROID-GO/
# https://wiki.odroid.com/odroid_go/odroid_go
# Original author: https://github.com/jedie
import time
+6 -6
View File
@@ -14,12 +14,12 @@ def init_rootscreen():
width = disp.get_horizontal_resolution()
height = disp.get_vertical_resolution()
dpi = disp.get_dpi()
# Initialize DisplayMetrics with actual display values
DisplayMetrics.set_resolution(width, height)
DisplayMetrics.set_dpi(dpi)
print(f"init_rootscreen set resolution to {width}x{height} at {dpi} DPI")
# Show logo
img = lv.image(screen)
img.set_src("M:builtin/res/mipmap-mdpi/MicroPythonOS-logo-white-long-w296.png") # from the MPOS-logo repo
@@ -105,15 +105,15 @@ def detect_board():
if single_address_i2c_scan(i2c0, 0x68): # IMU (MPU6886)
return "m5stack_fire"
print("odroid_go ?")
if check_pins(0, 13, 27, 39):
return "odroid_go"
print("fri3d_2024 ?")
if i2c0 := fail_save_i2c(sda=9, scl=18):
if single_address_i2c_scan(i2c0, 0x6B): # IMU (plus possibly the Communicator's LANA TNY at 0x38)
return "fri3d_2024"
print("odroid_go ?")
if check_pins(0, 13, 27, 39): # this matches too much (also fri3d_2024) so move towards the end
return "odroid_go"
print("Fallback to fri3d_2026")
# default: if single_address_i2c_scan(i2c0, 0x6A): # IMU but currently not installed
return "fri3d_2026"
+1 -1
View File
@@ -86,7 +86,7 @@ if [ "$target" == "esp32" -o "$target" == "esp32s3" ]; then
BOARD_VARIANT=SPIRAM_OCT
fi
manifest=$(readlink -f "$codebasedir"/manifests/manifest.py)
frozenmanifest="FROZEN_MANIFEST=$manifest"
#frozenmanifest="FROZEN_MANIFEST=$manifest"
echo "Note that you can also prevent the builtin filesystem from being mounted by umounting it and creating a builtin/ folder."
pushd "$codebasedir"/lvgl_micropython/
rm -rf lib/micropython/ports/esp32/build-$BOARD-$BOARD_VARIANT