Skip to content

Commit

Permalink
Fix parsing of ESP32 chiptype (#272)
Browse files Browse the repository at this point in the history
***NO_CI***
  • Loading branch information
josesimoes authored May 31, 2024
1 parent f3c8253 commit b1fb1ba
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nanoFirmwareFlasher.Library/EspTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,9 @@ public Esp32DeviceInfo GetDeviceDetails(
}
}

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>.*)");
var match = Regex.Match(messages,
$"(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>.*)");

if (!match.Success)
{
throw new EspToolExecutionException(messages);
Expand Down

0 comments on commit b1fb1ba

Please sign in to comment.