upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/main/tollgate_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/tollgate_main.c')
-rw-r--r--main/tollgate_main.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index c0ff65f..7fd50ad 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -54,7 +54,11 @@ static void wifi_event_handler(void *arg, esp_event_base_t event_base,
54 s_retry_count++; 54 s_retry_count++;
55 ESP_LOGW(TAG, "WiFi disconnected, retry %d/%d", s_retry_count, MAX_STA_RETRY); 55 ESP_LOGW(TAG, "WiFi disconnected, retry %d/%d", s_retry_count, MAX_STA_RETRY);
56 tollgate_client_on_sta_disconnected(); 56 tollgate_client_on_sta_disconnected();
57 if (s_services_running) stop_services(); 57 if (s_services_running) {
58 stop_services();
59 display_set_state(DISPLAY_ERROR);
60 }
61 display_update(NULL, 0, 0, NULL, NULL, 0, "WiFi retry...");
58 if (s_retry_count < MAX_STA_RETRY) { 62 if (s_retry_count < MAX_STA_RETRY) {
59 esp_wifi_connect(); 63 esp_wifi_connect();
60 } else { 64 } else {
@@ -173,7 +177,8 @@ static void start_services(void)
173 display_set_state(DISPLAY_READY); 177 display_set_state(DISPLAY_READY);
174 char portal_url[128]; 178 char portal_url[128];
175 snprintf(portal_url, sizeof(portal_url), "http://%s/", cfg->ap_ip_str); 179 snprintf(portal_url, sizeof(portal_url), "http://%s/", cfg->ap_ip_str);
176 display_update(cfg->ap_ssid, 0, 0, portal_url); 180 display_update(cfg->ap_ssid, 0, 0, portal_url,
181 cfg->mint_url, cfg->price_per_step, NULL);
177} 182}
178 183
179static void stop_services(void) 184static void stop_services(void)