From 8b65cf403229f3839c791ae1b7f8d2bbc266772b Mon Sep 17 00:00:00 2001 From: Gediminas Jakutis Date: Wed, 10 Apr 2019 00:49:58 +0300 Subject: 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 --- src/device/main.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/device/main.ino') 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(); } -- cgit v1.2.3