From 9dc7ef612e3dddfea3a85e8fe99e1abb431ce233 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Fri, 26 Dec 2025 14:33:17 -0600 Subject: [PATCH] In autoconf, don't probe Wire unless i2c device is set (#9081) Found another bit of code that crashes my desktop, by probing the wrong i2c bus. --- src/platform/portduino/PortduinoGlue.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index 1b601f9b4..ea9e2de67 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -279,7 +279,7 @@ void portduinoSetup() // RAK6421-13300-S1:aabbcc123456:5ba85807d92138b7519cfb60460573af:3061e8d8 // :mac address :<16 random unique bytes in hexidecimal> : crc32 // crc32 is calculated on the eeprom string up to but not including the final colon - if (strlen(autoconf_product) < 6) { + if (strlen(autoconf_product) < 6 && portduino_config.i2cdev != "") { try { char *mac_start = nullptr; char *devID_start = nullptr; @@ -867,4 +867,4 @@ void readGPIOFromYaml(YAML::Node sourceNode, pinMapping &destPin, int pinDefault destPin.line = destPin.pin; destPin.gpiochip = portduino_config.lora_default_gpiochip; } -} \ No newline at end of file +}