qshell: rename qshell sequence fields so they can be parsed on fastrtpsgen

This commit is contained in:
TSC21 2019-09-04 16:03:48 +01:00 committed by Nuno Marques
parent 69475a172b
commit f6a5c7cca9
4 changed files with 5 additions and 5 deletions

View File

@ -2,4 +2,4 @@ uint64 timestamp # time since system start (microseconds)
char[100] cmd char[100] cmd
uint32 MAX_STRLEN = 100 uint32 MAX_STRLEN = 100
uint32 strlen uint32 strlen
uint32 sequence uint32 request_sequence

View File

@ -1,3 +1,3 @@
uint64 timestamp # time since system start (microseconds) uint64 timestamp # time since system start (microseconds)
int32 return_value int32 return_value
uint32 sequence uint32 return_sequence

View File

@ -101,7 +101,7 @@ int QShell::_send_cmd(std::vector<std::string> &argList)
qshell_req.strlen = cmd.size(); qshell_req.strlen = cmd.size();
strcpy((char *)qshell_req.cmd, cmd.c_str()); strcpy((char *)qshell_req.cmd, cmd.c_str());
qshell_req.sequence = _current_sequence; qshell_req.request_sequence = _current_sequence;
int instance; int instance;
orb_publish_auto(ORB_ID(qshell_req), &_pub_qshell_req, &qshell_req, &instance, ORB_PRIO_DEFAULT); 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; struct qshell_retval_s retval;
orb_copy(ORB_ID(qshell_retval), _sub_qshell_retval, &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"); PX4_WARN("Ignoring return value with wrong sequence");
} else { } else {

View File

@ -116,7 +116,7 @@ int QShell::main()
struct qshell_retval_s retval; struct qshell_retval_s retval;
retval.return_value = run_cmd(appargs); retval.return_value = run_cmd(appargs);
retval.sequence = m_qshell_req.sequence; retval.return_sequence = m_qshell_req.request_sequence;
if (retval.return_value) { if (retval.return_value) {
PX4_ERR("Failed to execute command: %s", m_qshell_req.cmd); PX4_ERR("Failed to execute command: %s", m_qshell_req.cmd);