From 6b4862497fd8a791b10b3505ffb17acb4d6346f5 Mon Sep 17 00:00:00 2001 From: Jan Dvorak Date: Thu, 2 May 2019 00:27:49 +0200 Subject: [PATCH] getDeviceInfo for serial communication --- src/protocol.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/protocol.cpp b/src/protocol.cpp index affd594..12bb926 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -216,6 +216,14 @@ void CC_Protocol::setDefaultCallbacks() CCLOGI("Parameter '%s' updated to '%s'",name.c_str(), value.c_str()); } }); + + if (m_is_remote == false) { + setCommandCallback("getDeviceInfo", [this](const JsonDocument& j) { + sendHello(); + sendDiagnostics(); + sendAllParameters(); + }); + } } void CC_Protocol::importCallbacks(CC_Protocol* source)