From 9f84ee42e774b75d12d3b8ca9d5eafc04eb4cf9e Mon Sep 17 00:00:00 2001 From: Michael Bonani Date: Wed, 26 Jan 2022 16:29:36 +0100 Subject: [PATCH] reput firmware restore --- aseba/thymio-device-manager/aseba_endpoint.cpp | 9 +++++++-- aseba/thymio-device-manager/aseba_endpoint.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/aseba/thymio-device-manager/aseba_endpoint.cpp b/aseba/thymio-device-manager/aseba_endpoint.cpp index 3e6b2fccc..feac599ef 100644 --- a/aseba/thymio-device-manager/aseba_endpoint.cpp +++ b/aseba/thymio-device-manager/aseba_endpoint.cpp @@ -172,12 +172,17 @@ void aseba_endpoint::handle_read(boost::system::error_code ec, std::shared_ptrmessage_name(), ec.message()); - + m_has_had_sucessful_read = true; + auto node_id = msg->source; auto it = m_nodes.find(node_id); auto node = it == std::end(m_nodes) ? std::shared_ptr{} : it->second.node; diff --git a/aseba/thymio-device-manager/aseba_endpoint.h b/aseba/thymio-device-manager/aseba_endpoint.h index 35ae4aa37..0ce99d2c7 100644 --- a/aseba/thymio-device-manager/aseba_endpoint.h +++ b/aseba/thymio-device-manager/aseba_endpoint.h @@ -273,6 +273,7 @@ class aseba_endpoint : public std::enable_shared_from_this { node_id m_uuid; bool m_upgrading_firmware = false; + bool m_has_had_sucessful_read = false; bool m_first_ping = true; bool m_rebooting = false; };