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.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/main/tollgate_main.c b/main/tollgate_main.c
index 697dae3..f8998bd 100644
--- a/main/tollgate_main.c
+++ b/main/tollgate_main.c
@@ -20,8 +20,6 @@
20#include "wifistr.h" 20#include "wifistr.h"
21#include "tollgate_client.h" 21#include "tollgate_client.h"
22#include "lightning_payout.h" 22#include "lightning_payout.h"
23#include "cvm_server.h"
24#include "display.h"
25 23
26#define MAX_STA_RETRY 5 24#define MAX_STA_RETRY 5
27static const char *TAG = "tollgate_main"; 25static const char *TAG = "tollgate_main";
@@ -152,19 +150,9 @@ static void start_services(void)
152 150
153 xTaskCreate(publish_wifistr_task, "wifistr_init", 16384, NULL, 3, NULL); 151 xTaskCreate(publish_wifistr_task, "wifistr_init", 16384, NULL, 3, NULL);
154 152
155 if (cfg->cvm_enabled) {
156 cvm_server_init();
157 cvm_server_start();
158 }
159
160 s_services_running = true; 153 s_services_running = true;
161 if (s_services_mutex) xSemaphoreGive(s_services_mutex); 154 if (s_services_mutex) xSemaphoreGive(s_services_mutex);
162 ESP_LOGI(TAG, "=== TollGate services started ==="); 155 ESP_LOGI(TAG, "=== TollGate services started ===");
163
164 display_set_state(DISPLAY_READY);
165 char portal_url[128];
166 snprintf(portal_url, sizeof(portal_url), "http://%s/", cfg->ap_ip_str);
167 display_update(cfg->ap_ssid, 0, 0, portal_url);
168} 156}
169 157
170static void stop_services(void) 158static void stop_services(void)
@@ -178,7 +166,6 @@ static void stop_services(void)
178 captive_portal_stop(); 166 captive_portal_stop();
179 tollgate_api_stop(); 167 tollgate_api_stop();
180 tollgate_core_dns_stop(); 168 tollgate_core_dns_stop();
181 cvm_server_stop();
182 s_services_running = false; 169 s_services_running = false;
183 if (s_services_mutex) xSemaphoreGive(s_services_mutex); 170 if (s_services_mutex) xSemaphoreGive(s_services_mutex);
184 ESP_LOGI(TAG, "=== TollGate services stopped ==="); 171 ESP_LOGI(TAG, "=== TollGate services stopped ===");
@@ -244,9 +231,6 @@ void app_main(void)
244{ 231{
245 ESP_LOGI(TAG, "=== TollGate ESP32 Starting ==="); 232 ESP_LOGI(TAG, "=== TollGate ESP32 Starting ===");
246 233
247 display_init();
248 display_set_state(DISPLAY_BOOT);
249
250 esp_err_t ret = nvs_flash_init(); 234 esp_err_t ret = nvs_flash_init();
251 if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) { 235 if (ret == ESP_ERR_NVS_NO_FREE_PAGES || ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
252 ESP_ERROR_CHECK(nvs_flash_erase()); 236 ESP_ERROR_CHECK(nvs_flash_erase());