Skip to content

Commit

Permalink
Added wifi check function with paramter to set check interval
Browse files Browse the repository at this point in the history
  • Loading branch information
maccoylton committed Nov 25, 2019
1 parent 9d15b86 commit b3d519d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ EXTRA_COMPONENTS = \
$(abspath ../components/esp-wifi-config)\
$(abspath ../components/UDPlogger)\
$(abspath ../components/esp-qrcode)\
$(abspath ../components/esp-button)\
$(abspath ../components/esp-adv-button)\
$(abspath ../components/esp-homekit-common-functions/led_codes)\
$(abspath ../components/esp-homekit-common-functions/ota)\
Expand Down
4 changes: 3 additions & 1 deletion src/wifi_thermostat.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ ETSTimer screen_timer;

#include <ota-api.h>
homekit_characteristic_t wifi_reset = HOMEKIT_CHARACTERISTIC_(CUSTOM_WIFI_RESET, false, .setter=wifi_reset_set);
homekit_characteristic_t wifi_check_interval = HOMEKIT_CHARACTERISTIC_(CUSTOM_WIFI_CHECK_INTERVAL, 10, .setter=wifi_check_interval_set);
/* checks the wifi is connected and flashes status led to indicated connected */
homekit_characteristic_t ota_trigger = API_OTA_TRIGGER;
homekit_characteristic_t name = HOMEKIT_CHARACTERISTIC_(NAME, DEVICE_NAME);
homekit_characteristic_t manufacturer = HOMEKIT_CHARACTERISTIC_(MANUFACTURER, DEVICE_MANUFACTURER);
Expand Down Expand Up @@ -644,7 +646,7 @@ void user_init(void) {
screen_init();
printf ("Screen init called\n");

wifi_config_init("WiFi-Thermostat", NULL, on_wifi_ready);
wifi_config_init(DEVICE_NAME, NULL, on_wifi_ready);

}

Expand Down

0 comments on commit b3d519d

Please sign in to comment.