From f6a5c7cca96cc61770aa4889810ba92695f61baf Mon Sep 17 00:00:00 2001 From: TSC21 Date: Wed, 4 Sep 2019 16:03:48 +0100 Subject: [PATCH] qshell: rename qshell sequence fields so they can be parsed on fastrtpsgen --- msg/qshell_req.msg | 2 +- msg/qshell_retval.msg | 2 +- src/drivers/qshell/posix/qshell.cpp | 4 ++-- src/drivers/qshell/qurt/qshell.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/msg/qshell_req.msg b/msg/qshell_req.msg index 6ee2a6cb19..d472e8dd33 100644 --- a/msg/qshell_req.msg +++ b/msg/qshell_req.msg @@ -2,4 +2,4 @@ uint64 timestamp # time since system start (microseconds) char[100] cmd uint32 MAX_STRLEN = 100 uint32 strlen -uint32 sequence +uint32 request_sequence diff --git a/msg/qshell_retval.msg b/msg/qshell_retval.msg index c8c56fd728..d42a7715ff 100644 --- a/msg/qshell_retval.msg +++ b/msg/qshell_retval.msg @@ -1,3 +1,3 @@ uint64 timestamp # time since system start (microseconds) int32 return_value -uint32 sequence +uint32 return_sequence diff --git a/src/drivers/qshell/posix/qshell.cpp b/src/drivers/qshell/posix/qshell.cpp index d111db42e0..34da787073 100644 --- a/src/drivers/qshell/posix/qshell.cpp +++ b/src/drivers/qshell/posix/qshell.cpp @@ -101,7 +101,7 @@ int QShell::_send_cmd(std::vector &argList) qshell_req.strlen = cmd.size(); strcpy((char *)qshell_req.cmd, cmd.c_str()); - qshell_req.sequence = _current_sequence; + qshell_req.request_sequence = _current_sequence; int instance; orb_publish_auto(ORB_ID(qshell_req), &_pub_qshell_req, &qshell_req, &instance, ORB_PRIO_DEFAULT); @@ -131,7 +131,7 @@ int QShell::_wait_for_retval() struct qshell_retval_s retval; orb_copy(ORB_ID(qshell_retval), _sub_qshell_retval, &retval); - if (retval.sequence != _current_sequence) { + if (retval.return_sequence != _current_sequence) { PX4_WARN("Ignoring return value with wrong sequence"); } else { diff --git a/src/drivers/qshell/qurt/qshell.cpp b/src/drivers/qshell/qurt/qshell.cpp index 9a7c55417a..5988fcd073 100644 --- a/src/drivers/qshell/qurt/qshell.cpp +++ b/src/drivers/qshell/qurt/qshell.cpp @@ -116,7 +116,7 @@ int QShell::main() struct qshell_retval_s retval; retval.return_value = run_cmd(appargs); - retval.sequence = m_qshell_req.sequence; + retval.return_sequence = m_qshell_req.request_sequence; if (retval.return_value) { PX4_ERR("Failed to execute command: %s", m_qshell_req.cmd);