diff options
author | 2019-04-10 00:49:58 +0300 | |
---|---|---|
committer | 2019-04-10 00:49:58 +0300 | |
commit | 8b65cf403229f3839c791ae1b7f8d2bbc266772b (patch) | |
tree | fcfa6555c188c2c6744c2d63ef41801786c4c988 /src/device/main.ino | |
parent | 66dea0ba9ac413819059606c748cb5446ccbb5d1 (diff) | |
download | usurpation-8b65cf403229f3839c791ae1b7f8d2bbc266772b.tar.gz usurpation-8b65cf403229f3839c791ae1b7f8d2bbc266772b.tar.bz2 usurpation-8b65cf403229f3839c791ae1b7f8d2bbc266772b.zip |
device: make ssid and password easy to modify
The SSID and PSK the device is going to attempt connecting
can now be changed with a recompiliation by adjusting the
"ssid" and "password" build options for meson with e.g.
meson configure -Dssid=realssid -Dpassword=actualpsk
Default SSID and PSK are included to otherwise allow
test builds.
this closes ticket 26.
Signed-off-by: Gediminas Jakutis <gediminas@varciai.lt>
Diffstat (limited to 'src/device/main.ino')
-rw-r--r-- | src/device/main.ino | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/device/main.ino b/src/device/main.ino index eb5d122..28e8dae 100644 --- a/src/device/main.ino +++ b/src/device/main.ino @@ -44,9 +44,11 @@ static void blink_led(const int pin, const int ontime, const int offtime); void setup(void) { + extern const char * const ssid; + extern const char * const password; pinMode(internal_led, OUTPUT); toggle_led(internal_led); - wifi_connect("ssid", "password", 1, internal_led); + wifi_connect(ssid, password, 1, internal_led); discover_client(); } |