Browse Source

Timeout constant values are used now.

klaute 1 year ago
parent
commit
ef2a6c15de
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      firmware/firmware.ino

+ 5
- 3
firmware/firmware.ino View File

@@ -57,6 +57,8 @@ void setup() {
57 57
 #endif
58 58
 
59 59
   // Pin settings
60
+  pinMode(BAT_CHARGED_PIN, INPUT);
61
+  pinMode(BAT_CHARGING_PIN, INPUT);
60 62
   pinMode(STATUS_LED_PIN, OUTPUT);
61 63
   pinMode(ANEMOMETER_PIN, INPUT_PULLUP);
62 64
   pinMode(A0, INPUT);
@@ -69,9 +71,9 @@ void setup() {
69 71
   // Establish WiFi connection
70 72
   String wifiName = "oko-weather-" + DEVICE_NAME;
71 73
 
72
-  wifiManager.setMinimumSignalQuality(15);
73
-  wifiManager.setConnectTimeout(60); // the time in seconds to wait for the known wifi connection
74
-  wifiManager.setTimeout(60); // the time in seconds to wait for the user to configure the device
74
+  wifiManager.setMinimumSignalQuality(16);
75
+  wifiManager.setConnectTimeout(WIFI_AUTOCONNECT_TIMEOUT_S); // the time in seconds to wait for the known wifi connection
76
+  wifiManager.setTimeout(WIFI_CONFIG_PORTAL_TIMEOUT_S); // the time in seconds to wait for the user to configure the device
75 77
 
76 78
   if (!wifiManager.autoConnect(wifiName.c_str(), "DEADBEEF")) {
77 79
 #ifdef DEBUG

Loading…
Cancel
Save