diff --git a/.gitignore b/.gitignore index 3810ded..dcf82d9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ lib/ local/ share/ -src/password.txt +src/passwords.h diff --git a/src/main.cpp b/src/main.cpp index 0362310..3b40549 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,13 +27,14 @@ extern "C" { #include #include "main.h" +#include "passwords.h" const char* server = "ingress.opensensemap.org"; #define MQTT_MAX_PACKET_SIZE 512 const char* mqttserver = "home.xd0.de"; const char* mqttusername = "esp-weatherstation"; -const char* mqttpassword = "password4"; +const char* mqttpassword = PWD_MQTT; constexpr unsigned int postingInterval = 60000; //Uploadintervall in Millisekunden constexpr unsigned int dhcp_interval = 60*60*1000; @@ -240,9 +241,9 @@ void ICACHE_FLASH_ATTR sendValues() { delay(1); // yield(); WiFi.persistent(false); // don't load and save credentials to flash WiFi.mode(WIFI_STA); - wifiMulti.addAP("nether.net", "password1"); - wifiMulti.addAP("LNet", "password2"); - wifiMulti.addAP("hw1_gast", "password3"); + wifiMulti.addAP("nether.net", PWD_NETHERNET); + wifiMulti.addAP("LNet", PWD_LNET); + wifiMulti.addAP("hw1_gast", PWD_HW1); wifiMulti.addAP("Freifunk", ""); if ( ip != INADDR_NONE && dns != INADDR_NONE && gateway != INADDR_NONE && subnet != INADDR_NONE