diff options
| author | Your Name <you@example.com> | 2026-05-18 19:20:35 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-18 19:20:35 +0530 |
| commit | c8c68dcc0dc4b897519105faec64994e820af0c2 (patch) | |
| tree | 56fab9d5d576efaf80045b228b1d292a66049ab9 /main/tollgate_main.c | |
| parent | f6369f5b87f5dab17a03315d82454fdcdd668ec9 (diff) | |
fix: build-verify tollgate_core component extraction
- Remove display/cvm/font deps from CMakeLists (not yet merged branches)
- Add tollgate_platform.h include to session header
- Add tollgate_core_session_set_platform declaration
- Remove duplicate tollgate_core_dns_stop wrapper (dns module has own impl)
- Update captive_portal.c to use tollgate_core_* API
- Remove display/cvm calls from tollgate_main.c
- Add tollgate_get_platform declaration to config.h
- Fix nucula wallet.hpp submodule (save_proofs visibility)
- Add tollgate_core include paths to test Makefile
- Build passes, all unit tests pass (61/61)
Diffstat (limited to 'main/tollgate_main.c')
| -rw-r--r-- | main/tollgate_main.c | 16 |
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 |
| 27 | static const char *TAG = "tollgate_main"; | 25 | static 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 | ||
| 170 | static void stop_services(void) | 158 | static 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()); |