mirror of
https://github.com/wled/WLED.git
synced 2025-07-18 16:26:32 +00:00
load_usermods: Split on any whitespace
This allows the common newline syntax in platformio
This commit is contained in:
parent
f72b5d04e8
commit
2431f2058b
@ -35,7 +35,7 @@ if usermods:
|
|||||||
deps = env.GetProjectOption('lib_deps')
|
deps = env.GetProjectOption('lib_deps')
|
||||||
src_dir = proj.get("platformio", "src_dir")
|
src_dir = proj.get("platformio", "src_dir")
|
||||||
src_dir = src_dir.replace('\\','/')
|
src_dir = src_dir.replace('\\','/')
|
||||||
mod_paths = {mod: find_usermod(mod) for mod in usermods.split(" ")}
|
mod_paths = {mod: find_usermod(mod) for mod in usermods.split()}
|
||||||
usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()]
|
usermods = [f"{mod} = symlink://{path}" for mod, path in mod_paths.items()]
|
||||||
proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods)
|
proj.set("env:" + env['PIOENV'], 'lib_deps', deps + usermods)
|
||||||
# Force usermods to be installed in to the environment build state before the LDF runs
|
# Force usermods to be installed in to the environment build state before the LDF runs
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
|
|
||||||
usermods = env.GetProjectOption("custom_usermods","").split(" ")
|
usermods = env.GetProjectOption("custom_usermods","").split()
|
||||||
# Check for dependencies
|
# Check for dependencies
|
||||||
if "Temperature" in usermods:
|
if "Temperature" in usermods:
|
||||||
env.Append(CPPDEFINES=[("USERMOD_DALLASTEMPERATURE")])
|
env.Append(CPPDEFINES=[("USERMOD_DALLASTEMPERATURE")])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user