Add needed support bits for the Meshstick

This commit is contained in:
Jonathan Bennett
2025-12-21 21:20:25 -06:00
parent 5a3855b208
commit da43536ad4
3 changed files with 23 additions and 1 deletions

View File

@@ -366,6 +366,14 @@ void portduinoSetup()
cleanupNameForAutoconf("lora-hat-" + std::string(hat_vendor) + "-" + autoconf_product + ".yaml");
} else if (found_ch341) {
product_config = cleanupNameForAutoconf("lora-usb-" + std::string(autoconf_product) + ".yaml");
// look for more data after the null terminator
size_t len = strlen(autoconf_product);
if (len < 75) {
memcpy(portduino_config.device_id, autoconf_product + len + 1, 16);
if (!memfll(portduino_config.device_id, '\0', 16) && !memfll(portduino_config.device_id, 0xff, 16)) {
portduino_config.has_device_id = true;
}
}
}
// Don't try to automatically find config for a device with RAK eeprom.