Removed unnecessary 'devices' element from TDFs

This commit is contained in:
Nav
2021-06-02 23:24:05 +01:00
parent 80749e2b5b
commit 5f580cc387
249 changed files with 182416 additions and 176806 deletions

View File

@@ -81,7 +81,7 @@ function processAvrPartFiles($path) : array {
continue;
}
$device = $pdXml->devices[0]->device;
$device = $pdXml->device;
$partDescriptionXml = new TargetDescription();
$partDescriptionXml->originalFilePath = $file;

View File

@@ -32,10 +32,8 @@ class TargetDescriptionFile
$this->xml = $xml;
/** @var SimpleXMLElement[] $devices */
$devices = (array) $xml->devices;
if (!empty($devices)) {
$device = reset($devices);
$device = $this->xml->device;
if (!empty($device)) {
$deviceAttributes = $device->attributes();
if (!empty($deviceAttributes['name'])) {