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

Compile time PIN definition #4307

Open
wants to merge 1 commit into
base: 0_15
Choose a base branch
from

Conversation

blazoncek
Copy link
Collaborator

Adds ability to define default settings PIN at compile time (instead of no PIN defined).

Requested by a friend.

@w00000dy
Copy link
Contributor

How do I set this?

I tried build_flags =... -D WLED_PIN=1234 and -D WLED_PIN="1234". Both did not work.

@blazoncek
Copy link
Collaborator Author

Either: -D WLED_PIN=\"1234\" or -D WLED_PIN='"1234"' as used elsewhere.

Copy link
Contributor

@w00000dy w00000dy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few things I noticed:

  • This only works if you have a fresh installation (erased flash).
  • On the first boot it does not ask for the pin. Only after the 2nd boot does it ask for the pin.

WLED_GLOBAL bool wifiLock _INIT(false); // prevents access to WiFi settings when OTA lock is enabled
WLED_GLOBAL bool aOtaEnabled _INIT(true); // ArduinoOTA allows easy updates directly from the IDE. Careful, it does not auto-disable when OTA lock is on
WLED_GLOBAL char settingsPIN[5] _INIT(""); // PIN for settings pages
WLED_GLOBAL bool otaLock _INIT(false); // prevents OTA firmware updates without password. ALWAYS enable if system exposed to any public networks
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert unrelated whitespace changes please

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

Successfully merging this pull request may close these issues.

3 participants