From 441204236efaedabf5c8bdc62e864d1b40846c8b Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Sun, 15 Apr 2018 14:32:26 +0200 Subject: [PATCH] main.cpp: single core option removed --- src/main.cpp | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 6a50a728..9c820c60 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -495,30 +495,16 @@ wifi_sniffer_init(); // setup wifi in monitor mode and start MAC counting // note: do this *after* wifi has started, since gets it's seed from RF noise salt_reset(); // get new 16bit for salting hashes -// Start FreeRTOS tasks -#if CONFIG_FREERTOS_UNICORE // run all tasks on core 0 and switch off core 1 - ESP_LOGI(TAG, "Starting Lora task on core 0"); - xTaskCreatePinnedToCore(lorawan_loop, "loratask", 2048, ( void * ) 1, ( 5 | portPRIVILEGE_BIT ), NULL, 0); - ESP_LOGI(TAG, "Starting Wifi task on core 0"); - xTaskCreatePinnedToCore(wifi_sniffer_loop, "wifisniffer", 4096, ( void * ) 1, 1, NULL, 0); - #ifdef BLECOUNTER - if (cfg.blescan) { // start BLE task only if BLE function is enabled in NVRAM configuration - ESP_LOGI(TAG, "Starting Bluetooth task on core 1"); - xTaskCreatePinnedToCore(bt_loop, "btscan", 8192, NULL, 5, NULL, 0); - } - #endif - // to come here: code for switching off core 1 -#else // run wifi task on core 0 and lora task on core 1 and bt task on core 0 - ESP_LOGI(TAG, "Starting Lora task on core 1"); - xTaskCreatePinnedToCore(lorawan_loop, "loratask", 2048, ( void * ) 1, ( 5 | portPRIVILEGE_BIT ), NULL, 1); - ESP_LOGI(TAG, "Starting Wifi task on core 0"); - xTaskCreatePinnedToCore(sniffer_loop, "wifisniffer", 4096, ( void * ) 1, 1, NULL, 0); - #ifdef BLECOUNTER - if (cfg.blescan) { // start BLE task only if BLE function is enabled in NVRAM configuration - ESP_LOGI(TAG, "Starting Bluetooth task on core 1"); - xTaskCreatePinnedToCore(bt_loop, "btscan", 8192, NULL, 5, NULL, 0); - } - #endif +// run wifi task on core 0 and lora task on core 1 and bt task on core 0 +ESP_LOGI(TAG, "Starting Lora task on core 1"); +xTaskCreatePinnedToCore(lorawan_loop, "loratask", 2048, ( void * ) 1, ( 5 | portPRIVILEGE_BIT ), NULL, 1); +ESP_LOGI(TAG, "Starting Wifi task on core 0"); +xTaskCreatePinnedToCore(sniffer_loop, "wifisniffer", 4096, ( void * ) 1, 1, NULL, 0); +#ifdef BLECOUNTER + if (cfg.blescan) { // start BLE task only if BLE function is enabled in NVRAM configuration + ESP_LOGI(TAG, "Starting Bluetooth task on core 0"); + xTaskCreatePinnedToCore(bt_loop, "btscan", 8192, NULL, 5, NULL, 0); + } #endif // Finally: kickoff first sendjob and join, then send initial payload "0000"