mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
make task cores configurable in platformio.ini
This commit is contained in:
@@ -44,7 +44,7 @@ void MqttSettingsService::startClient() {
|
||||
if (_state.enableTLS) {
|
||||
isSecure = true;
|
||||
if (emsesp::EMSESP::system_.PSram() > 0) {
|
||||
_mqttClient = new espMqttClientSecure(espMqttClientTypes::UseInternalTask::YES);
|
||||
_mqttClient = new espMqttClientSecure(EMSESP_MQTT_PRIORITY, EMSESP_MQTT_RUNNING_CORE);
|
||||
} else {
|
||||
_mqttClient = new espMqttClientSecure(espMqttClientTypes::UseInternalTask::NO);
|
||||
}
|
||||
@@ -64,7 +64,7 @@ void MqttSettingsService::startClient() {
|
||||
#endif
|
||||
isSecure = false;
|
||||
if (emsesp::EMSESP::system_.PSram() > 0) {
|
||||
_mqttClient = new espMqttClient(espMqttClientTypes::UseInternalTask::YES);
|
||||
_mqttClient = new espMqttClient(EMSESP_MQTT_PRIORITY, EMSESP_MQTT_RUNNING_CORE);
|
||||
} else {
|
||||
_mqttClient = new espMqttClient(espMqttClientTypes::UseInternalTask::NO);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,19 @@
|
||||
#define FACTORY_MQTT_MAX_TOPIC_LENGTH 128
|
||||
#endif
|
||||
|
||||
#ifndef EMSESP_MQTT_RUNNING_CORE
|
||||
#define EMSESP_MQTT_RUNNING_CORE 1
|
||||
#endif
|
||||
|
||||
#ifdef EMSESP_MQTT_STACKSIZE
|
||||
#undef EMC_TASK_STACK_SIZE
|
||||
#define EMC_TASK_STACK_SIZE EMSESP_MQTT_STACKSIZE
|
||||
#endif
|
||||
|
||||
#ifndef EMSESP_MQTT_PRIORITY
|
||||
#define EMSESP_MQTT_PRIORITY 1
|
||||
#endif
|
||||
|
||||
class MqttSettings {
|
||||
public:
|
||||
bool enabled;
|
||||
|
||||
Reference in New Issue
Block a user