Fix single core devices
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
#define NUKI_HUB_VERSION "9.06"
|
#define NUKI_HUB_VERSION "9.06"
|
||||||
#define NUKI_HUB_VERSION_INT (uint32_t)906
|
#define NUKI_HUB_VERSION_INT (uint32_t)906
|
||||||
#define NUKI_HUB_BUILD "unknownbuildnr"
|
#define NUKI_HUB_BUILD "unknownbuildnr"
|
||||||
#define NUKI_HUB_DATE "2024-12-22"
|
#define NUKI_HUB_DATE "2024-12-26"
|
||||||
|
|
||||||
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
#define GITHUB_LATEST_RELEASE_URL (char*)"https://github.com/technyon/nuki_hub/releases/latest"
|
||||||
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
#define GITHUB_OTA_MANIFEST_URL (char*)"https://raw.githubusercontent.com/technyon/nuki_hub/binary/ota/manifest.json"
|
||||||
|
|||||||
@@ -210,14 +210,14 @@ inline void initPreferences(Preferences* preferences)
|
|||||||
preferences->putInt(preference_query_interval_configuration, 3600);
|
preferences->putInt(preference_query_interval_configuration, 3600);
|
||||||
preferences->putInt(preference_query_interval_battery, 1800);
|
preferences->putInt(preference_query_interval_battery, 1800);
|
||||||
preferences->putInt(preference_query_interval_keypad, 1800);
|
preferences->putInt(preference_query_interval_keypad, 1800);
|
||||||
|
|
||||||
preferences->putBool(preference_debug_connect, false);
|
preferences->putBool(preference_debug_connect, false);
|
||||||
preferences->putBool(preference_debug_communication, false);
|
preferences->putBool(preference_debug_communication, false);
|
||||||
preferences->putBool(preference_debug_readable_data, false);
|
preferences->putBool(preference_debug_readable_data, false);
|
||||||
preferences->putBool(preference_debug_hex_data, false);
|
preferences->putBool(preference_debug_hex_data, false);
|
||||||
preferences->putBool(preference_debug_command, false);
|
preferences->putBool(preference_debug_command, false);
|
||||||
preferences->putBool(preference_connect_mode, true);
|
preferences->putBool(preference_connect_mode, true);
|
||||||
|
|
||||||
preferences->putBool(preference_retain_gpio, false);
|
preferences->putBool(preference_retain_gpio, false);
|
||||||
|
|
||||||
#ifndef CONFIG_IDF_TARGET_ESP32H2
|
#ifndef CONFIG_IDF_TARGET_ESP32H2
|
||||||
@@ -232,6 +232,7 @@ inline void initPreferences(Preferences* preferences)
|
|||||||
Log->print("Last config version: ");
|
Log->print("Last config version: ");
|
||||||
Log->println(lastConfigVer);
|
Log->println(lastConfigVer);
|
||||||
Log->print("Current config version: ");
|
Log->print("Current config version: ");
|
||||||
|
Log->println(NUKI_HUB_VERSION_INT);
|
||||||
|
|
||||||
if(lastConfigVer >= NUKI_HUB_VERSION_INT && lastConfigVer < 20000) return;
|
if(lastConfigVer >= NUKI_HUB_VERSION_INT && lastConfigVer < 20000) return;
|
||||||
|
|
||||||
@@ -380,7 +381,7 @@ private:
|
|||||||
preference_auth_control_enabled, preference_auth_topic_per_entry, preference_auth_info_enabled, preference_auth_max_entries, preference_wifi_ssid, preference_wifi_pass,
|
preference_auth_control_enabled, preference_auth_topic_per_entry, preference_auth_info_enabled, preference_auth_max_entries, preference_wifi_ssid, preference_wifi_pass,
|
||||||
preference_keypad_check_code_enabled, preference_disable_network_not_connected, preference_mqtt_hass_enabled, preference_hass_device_discovery, preference_retain_gpio,
|
preference_keypad_check_code_enabled, preference_disable_network_not_connected, preference_mqtt_hass_enabled, preference_hass_device_discovery, preference_retain_gpio,
|
||||||
preference_debug_connect, preference_debug_communication, preference_debug_readable_data, preference_debug_hex_data, preference_debug_command, preference_connect_mode
|
preference_debug_connect, preference_debug_communication, preference_debug_readable_data, preference_debug_hex_data, preference_debug_command, preference_connect_mode
|
||||||
|
|
||||||
};
|
};
|
||||||
std::vector<char*> _redact =
|
std::vector<char*> _redact =
|
||||||
{
|
{
|
||||||
|
|||||||
10
src/main.cpp
10
src/main.cpp
@@ -9,6 +9,7 @@
|
|||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "esp32-hal-log.h"
|
#include "esp32-hal-log.h"
|
||||||
#include "hal/wdt_hal.h"
|
#include "hal/wdt_hal.h"
|
||||||
|
#include "esp_chip_info.h"
|
||||||
|
|
||||||
#ifndef NUKI_HUB_UPDATER
|
#ifndef NUKI_HUB_UPDATER
|
||||||
#include "NukiWrapper.h"
|
#include "NukiWrapper.h"
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
#include "PreferencesKeys.h"
|
#include "PreferencesKeys.h"
|
||||||
#include "RestartReason.h"
|
#include "RestartReason.h"
|
||||||
#include "EspMillis.h"
|
#include "EspMillis.h"
|
||||||
|
#include "NimBLEDevice.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#ifdef DEBUG_NUKIHUB
|
#ifdef DEBUG_NUKIHUB
|
||||||
@@ -444,16 +446,20 @@ void setupTasks(bool ota)
|
|||||||
};
|
};
|
||||||
esp_task_wdt_reconfigure(&twdt_config);
|
esp_task_wdt_reconfigure(&twdt_config);
|
||||||
|
|
||||||
|
esp_chip_info_t info;
|
||||||
|
esp_chip_info(&info);
|
||||||
|
uint8_t espCores = info.cores;
|
||||||
|
|
||||||
if(ota)
|
if(ota)
|
||||||
{
|
{
|
||||||
xTaskCreatePinnedToCore(otaTask, "ota", 8192, NULL, 2, &otaTaskHandle, 1);
|
xTaskCreatePinnedToCore(otaTask, "ota", 8192, NULL, 2, &otaTaskHandle, (espCores > 1) ? 1 : 0);
|
||||||
esp_task_wdt_add(otaTaskHandle);
|
esp_task_wdt_add(otaTaskHandle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if(!disableNetwork)
|
if(!disableNetwork)
|
||||||
{
|
{
|
||||||
xTaskCreatePinnedToCore(networkTask, "ntw", preferences->getInt(preference_task_size_network, NETWORK_TASK_SIZE), NULL, 3, &networkTaskHandle, 1);
|
xTaskCreatePinnedToCore(networkTask, "ntw", preferences->getInt(preference_task_size_network, NETWORK_TASK_SIZE), NULL, 3, &networkTaskHandle, (espCores > 1) ? 1 : 0);
|
||||||
esp_task_wdt_add(networkTaskHandle);
|
esp_task_wdt_add(networkTaskHandle);
|
||||||
}
|
}
|
||||||
#ifndef NUKI_HUB_UPDATER
|
#ifndef NUKI_HUB_UPDATER
|
||||||
|
|||||||
Reference in New Issue
Block a user