Handle espressif as espressif8266 dev/platform for LDF

This commit is contained in:
Ivan Kravets
2017-11-29 18:30:00 +02:00
parent 5846566bbb
commit f922fac9d9

View File

@ -511,15 +511,12 @@ class PlatformIOLibBuilder(LibBuilderBase):
manifest = util.load_json(join(self.path, "library.json")) manifest = util.load_json(join(self.path, "library.json"))
assert "name" in manifest assert "name" in manifest
# replace "espressif" dev/platform with ESP8266/ESP32 # replace "espressif" old name dev/platform with ESP8266
if "platforms" in manifest: if "platforms" in manifest:
new_platforms = [] manifest['platforms'] = [
for platform in self.items_to_list(manifest['platforms']): "espressif8266" if p == "espressif" else p
if platform == "espressif": for p in self.items_to_list(manifest['platforms'])
new_platforms.extend(["espressif8266", "espressif32"]) ]
else:
new_platforms.append(platform)
manifest['platforms'] = new_platforms
return manifest return manifest