b
This commit is contained in:
@@ -163,7 +163,7 @@ void ParameterProcess::WriteCmd(uint8_t m_sysid, uint8_t m_compid ,const char *i
|
||||
//这个函数类似中断,专门处理接收到的状态
|
||||
void ParameterProcess::Parse(mavlink_message_t msg)
|
||||
{
|
||||
|
||||
//qDebug() << "Parameter" << msg.msgid;
|
||||
|
||||
switch (msg.msgid) {
|
||||
case MAVLINK_MSG_ID_PARAM_SET:{
|
||||
@@ -176,7 +176,7 @@ void ParameterProcess::Parse(mavlink_message_t msg)
|
||||
|
||||
status.recieve.isWaitingforValue = false;
|
||||
status.transmit.isWaitingforValue = false;
|
||||
//qDebug() << "param_value.param_index" << param_value.param_index;
|
||||
qDebug() << "param_value.param_index" << param_value.param_index;
|
||||
}break;
|
||||
case MAVLINK_MSG_ID_PARAM_EXT_ACK:{
|
||||
mavlink_msg_param_ext_ack_decode(&msg,¶m_ext_ack);
|
||||
@@ -225,7 +225,7 @@ void ParameterProcess::ReadStateMachine(void)//一整列
|
||||
else if(step == 1)//等待收到Item
|
||||
{
|
||||
//如果超时,那么结束
|
||||
if((QTime::currentTime().msecsSinceStartOfDay() - time) > 2000)
|
||||
if((QTime::currentTime().msecsSinceStartOfDay() - time) > readTimeout)
|
||||
{
|
||||
|
||||
//做一个列表,记录谁丢了,后面单独请求
|
||||
@@ -310,7 +310,7 @@ void ParameterProcess::WriteStateMachine(void)
|
||||
}
|
||||
else if(step == 1)//等待返回
|
||||
{
|
||||
if((QTime::currentTime().msecsSinceStartOfDay() - time) > 2000)
|
||||
if((QTime::currentTime().msecsSinceStartOfDay() - time) > sendTimeout)
|
||||
{
|
||||
timeout_count ++;
|
||||
step = 0;//返回上一个步骤
|
||||
|
||||
Reference in New Issue
Block a user