Removed unnecessary 'devices' element from TDFs
This commit is contained in:
@@ -81,7 +81,7 @@ function processAvrPartFiles($path) : array {
|
||||
continue;
|
||||
}
|
||||
|
||||
$device = $pdXml->devices[0]->device;
|
||||
$device = $pdXml->device;
|
||||
|
||||
$partDescriptionXml = new TargetDescription();
|
||||
$partDescriptionXml->originalFilePath = $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'])) {
|
||||
|
||||
Reference in New Issue
Block a user