Skip to content

Commit b1fb1ba

Browse files
authored
Fix parsing of ESP32 chiptype (#272)
***NO_CI***
1 parent f3c8253 commit b1fb1ba

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nanoFirmwareFlasher.Library/EspTool.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,9 @@ public Esp32DeviceInfo GetDeviceDetails(
197197
}
198198
}
199199

200-
var match = Regex.Match(messages, $"(Detecting chip type... )(?<type>[ESP32\\-ICOCH]+)(.*?[\r\n]*)*(Chip is )(?<name>.*)(.*?[\r\n]*)*(Features: )(?<features>.*)(.*?[\r\n]*)*(Crystal is )(?<crystal>.*)(.*?[\r\n]*)*(MAC: )(?<mac>.*)(.*?[\r\n]*)*(Manufacturer: )(?<manufacturer>.*)(.*?[\r\n]*)*(Device: )(?<device>.*)(.*?[\r\n]*)*(Detected flash size: )(?<size>.*)");
200+
var match = Regex.Match(messages,
201+
$"(Detecting chip type... )(?<type>[ESP32\\-ICOCH6]+)(.*?[\r\n]*)*(Chip is )(?<name>.*)(.*?[\r\n]*)*(Features: )(?<features>.*)(.*?[\r\n]*)*(Crystal is )(?<crystal>.*)(.*?[\r\n]*)*(MAC: )(?<mac>.*)(.*?[\r\n]*)*(Manufacturer: )(?<manufacturer>.*)(.*?[\r\n]*)*(Device: )(?<device>.*)(.*?[\r\n]*)*(Detected flash size: )(?<size>.*)");
202+
201203
if (!match.Success)
202204
{
203205
throw new EspToolExecutionException(messages);

0 commit comments

Comments
 (0)