Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question for platformio.ini and user_config.h #2589

Closed
roblad opened this issue May 1, 2018 · 2 comments
Closed

Question for platformio.ini and user_config.h #2589

roblad opened this issue May 1, 2018 · 2 comments

Comments

@roblad
Copy link

roblad commented May 1, 2018

Hi,

Is it possible to read variable from platformio.ini i.e.
env_default = wemeos-d1-watter-PL
or any other setting for usage
to set user_config.h
#define MODULERL 1

arendst added a commit that referenced this issue May 1, 2018
5.13.0a
 * Add define MODULE for user selecting default model although
it preferably should not be changed (#569, #2589)
@arendst
Copy link
Owner

arendst commented May 1, 2018

This should do it but I do not support it.

@arendst arendst closed this as completed May 1, 2018
@roblad
Copy link
Author

roblad commented May 1, 2018

Hi,

Just for confirmation, could be like that ?

platformio.ini

[platformio]

env_default = sonoff-PL
...
[common]

build_flags =
-Wl,-Tesp8266.flash.1m0.ld
-DVTABLES_IN_FLASH
-DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
-DMY_LANGUAGE=pl-PL
-DENV_NAME=${platformio.env_default}

and in user_config.h

// ENV_NAME
const char *value = "sonoff-PL";
#if ENV_NAME == value

#define USE_SR04

#endif

http://docs.platformio.org/en/latest/projectconf/section_env_build.html#build-flags

curzon01 pushed a commit to curzon01/Tasmota that referenced this issue Sep 6, 2018
5.13.0a
 * Add define MODULE for user selecting default model although
it preferably should not be changed (arendst#569, arendst#2589)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants