mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 01:12:11 +00:00
qshell: rename qshell sequence fields so they can be parsed on fastrtpsgen
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
uint64 timestamp # time since system start (microseconds)
|
||||
int32 return_value
|
||||
uint32 sequence
|
||||
uint32 return_sequence
|
||||
|
||||
@@ -101,7 +101,7 @@ int QShell::_send_cmd(std::vector<std::string> &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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user