串口调通,采用在其他线程的模式
This commit is contained in:
@@ -214,13 +214,10 @@ void ParameterProcess::ReadStateMachine(void)//一整列
|
||||
qDebug() << "parameter item time out ";
|
||||
timeout_count = 0;
|
||||
|
||||
|
||||
if(status.recieve.type == _readtype::All)//如果是ALL的情况下,那么再用单独一个一个去请求一次
|
||||
{
|
||||
qDebug() << "try One mode";
|
||||
|
||||
status.recieve.type =_readtype::One;
|
||||
|
||||
status.recieve.isWaitingforValue = true;
|
||||
time = QTime::currentTime().msecsSinceStartOfDay();
|
||||
request_read("xxx",0);//读取0
|
||||
@@ -237,9 +234,7 @@ void ParameterProcess::ReadStateMachine(void)//一整列
|
||||
{
|
||||
//qDebug() << "parameter item reccieved";
|
||||
timeout_count = 0;
|
||||
|
||||
time = QTime::currentTime().msecsSinceStartOfDay();
|
||||
|
||||
//如果参数count 大于当前index,那么继续等待
|
||||
if((param_value.param_index+1) < param_value.param_count)
|
||||
{
|
||||
@@ -257,7 +252,6 @@ void ParameterProcess::ReadStateMachine(void)//一整列
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if(step == 2)//传输结束
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user