mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-23 17:13:38 +00:00
Portduino: Return CH341 Product Strng (#6436)
This commit is contained in:
parent
4a12b4eb32
commit
02237f5ac6
@ -210,7 +210,10 @@ void portduinoSetup()
|
||||
}
|
||||
char serial[9] = {0};
|
||||
ch341Hal->getSerialString(serial, 8);
|
||||
std::cout << "Serial " << serial << std::endl;
|
||||
std::cout << "CH341 Serial " << serial << std::endl;
|
||||
char product_string[96] = {0};
|
||||
ch341Hal->getProductString(product_string, 95);
|
||||
std::cout << "CH341 Product " << product_string << std::endl;
|
||||
if (strlen(serial) == 8 && settingsStrings[mac_address].length() < 12) {
|
||||
uint8_t hash[32] = {0};
|
||||
memcpy(hash, serial, 8);
|
||||
|
@ -61,6 +61,12 @@ class Ch341Hal : public RadioLibHal
|
||||
strncpy(_serial, pinedio.serial_number, len);
|
||||
}
|
||||
|
||||
void getProductString(char *_product_string, size_t len)
|
||||
{
|
||||
len = len > 95 ? 95 : len;
|
||||
strncpy(_product_string, pinedio.product_string, len);
|
||||
}
|
||||
|
||||
void init() override {}
|
||||
void term() override {}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user