mirror of
https://github.com/MrUnknownDE/OpenIris-ESPIDF.git
synced 2026-04-15 20:43:45 +02:00
Add support for keeping serial manager alive when in WiFi mode but connected to serial, fix resolving heartbeats
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
TaskHandle_t serialManagerHandle;
|
||||
|
||||
esp_timer_handle_t timerHandle;
|
||||
esp_timer_handle_t timerHandle = nullptr;
|
||||
QueueHandle_t eventQueue = xQueueCreate(10, sizeof(SystemEvent));
|
||||
QueueHandle_t ledStateQueue = xQueueCreate(10, sizeof(uint32_t));
|
||||
QueueHandle_t cdcMessageQueue = xQueueCreate(3, sizeof(cdc_command_packet_t));
|
||||
@@ -201,8 +201,15 @@ void startWiFiMode(bool shouldCloseSerialManager)
|
||||
ESP_LOGI("[MAIN]", "Starting WiFi streaming mode.");
|
||||
if (shouldCloseSerialManager)
|
||||
{
|
||||
ESP_LOGI("[MAIN]", "Closing serial manager task.");
|
||||
vTaskDelete(serialManagerHandle);
|
||||
if (!serialManager->isConnected())
|
||||
{
|
||||
ESP_LOGI("[MAIN]", "We're not connected to serial. Closing serial manager task.");
|
||||
vTaskDelete(serialManagerHandle);
|
||||
}
|
||||
else
|
||||
{
|
||||
ESP_LOGI("[MAIN]", "We're still connected to serial. Serial manager task will remain running.");
|
||||
}
|
||||
}
|
||||
|
||||
wifiManager->Begin();
|
||||
|
||||
Reference in New Issue
Block a user