mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da43536ad4 |
14
bin/config.d/lora-usb-meshstick-1262.yaml
Normal file
14
bin/config.d/lora-usb-meshstick-1262.yaml
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
Lora:
|
||||||
|
Module: sx1262
|
||||||
|
CS: 0
|
||||||
|
IRQ: 6
|
||||||
|
Reset: 2
|
||||||
|
Busy: 4
|
||||||
|
RXen: 1
|
||||||
|
DIO2_AS_RF_SWITCH: true
|
||||||
|
spidev: ch341
|
||||||
|
DIO3_TCXO_VOLTAGE: true
|
||||||
|
# USB_Serialnum: 12345678
|
||||||
|
USB_PID: 0x5512
|
||||||
|
USB_VID: 0x1A86
|
||||||
|
SX126X_MAX_POWER: 22
|
||||||
@@ -366,6 +366,14 @@ void portduinoSetup()
|
|||||||
cleanupNameForAutoconf("lora-hat-" + std::string(hat_vendor) + "-" + autoconf_product + ".yaml");
|
cleanupNameForAutoconf("lora-hat-" + std::string(hat_vendor) + "-" + autoconf_product + ".yaml");
|
||||||
} else if (found_ch341) {
|
} else if (found_ch341) {
|
||||||
product_config = cleanupNameForAutoconf("lora-usb-" + std::string(autoconf_product) + ".yaml");
|
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.
|
// Don't try to automatically find config for a device with RAK eeprom.
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class Ch341Hal : public RadioLibHal
|
|||||||
void getProductString(char *_product_string, size_t len)
|
void getProductString(char *_product_string, size_t len)
|
||||||
{
|
{
|
||||||
len = len > 95 ? 95 : len;
|
len = len > 95 ? 95 : len;
|
||||||
strncpy(_product_string, pinedio.product_string, len);
|
memcpy(_product_string, pinedio.product_string, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
void init() override {}
|
void init() override {}
|
||||||
|
|||||||
Reference in New Issue
Block a user