mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-10 09:49:54 +03:00
update to eModbus 1.7.4
This commit is contained in:
@@ -44,8 +44,6 @@ protected:
|
||||
ModbusServerTCP(ModbusServerTCP& m) = delete;
|
||||
ModbusServerTCP& operator=(ModbusServerTCP& m) = delete;
|
||||
|
||||
inline void isInstance() { }
|
||||
|
||||
uint8_t numClients;
|
||||
TaskHandle_t serverTask;
|
||||
uint16_t serverPort;
|
||||
@@ -159,7 +157,7 @@ template <typename ST, typename CT>
|
||||
snprintf(taskName, 18, "MBserve%04X", port);
|
||||
|
||||
// Start task to handle the client
|
||||
xTaskCreatePinnedToCore((TaskFunction_t)&serve, taskName, SERVER_TASK_STACK, this, 5, &serverTask, coreID >= 0 ? coreID : NULL);
|
||||
xTaskCreatePinnedToCore((TaskFunction_t)&serve, taskName, SERVER_TASK_STACK, this, 5, &serverTask, coreID >= 0 ? coreID : tskNO_AFFINITY);
|
||||
LOG_D("Server task %s started (%d).\n", taskName, (uint32_t)serverTask);
|
||||
|
||||
// Wait two seconds for it to establish
|
||||
@@ -206,7 +204,7 @@ bool ModbusServerTCP<ST, CT>::accept(CT& client, uint32_t timeout, int coreID) {
|
||||
snprintf(taskName, 18, "MBsrv%02Xclnt", i);
|
||||
|
||||
// Start task to handle the client
|
||||
xTaskCreatePinnedToCore((TaskFunction_t)&worker, taskName, SERVER_TASK_STACK, clients[i], 5, &clients[i]->task, coreID >= 0 ? coreID : NULL);
|
||||
xTaskCreatePinnedToCore((TaskFunction_t)&worker, taskName, SERVER_TASK_STACK, clients[i], 5, &clients[i]->task, coreID >= 0 ? coreID : tskNO_AFFINITY);
|
||||
LOG_D("Started client %d task %d\n", i, (uint32_t)(clients[i]->task));
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user