提交 cdadc36d 编写于 作者: 丁劲犇's avatar 丁劲犇 😸

调整策略,在连续发射时,要向外输出水位,以便及时准备数据

上级 767ce4ff
......@@ -477,6 +477,22 @@ int do_iio(const cmdlineParser & args)
try{
while (!stop_signal_called)
{
if (i_txWaterMark>0)
{
qint64 watM = stdin_pos[0] - tx_pos;
if (tx_channel_count>1)
{
qint64 wat2 = stdin_pos[1] - tx_pos;
if (wat2 < watM)
watM = wat2;
}
TASKBUS::push_subject(
i_txWaterMark,
instance,
sizeof(qint64),
(unsigned char *) &watM);
}
bool can_send = true;
for (int ch=0;ch<tx_channel_count && can_send;++ch)
{
......@@ -510,22 +526,6 @@ int do_iio(const cmdlineParser & args)
(const void **)tx_buff_ptr.data(),
tx_sps_buff, &tx_meta,0.1, &num_sps_sent));
tx_pos += num_sps_sent;
if (i_txWaterMark>0)
{
qint64 watM = stdin_pos[0] - tx_pos;
if (tx_channel_count>1)
{
qint64 wat2 = stdin_pos[1] - tx_pos;
if (wat2 < watM)
watM = wat2;
}
TASKBUS::push_subject(
i_txWaterMark,
instance,
sizeof(qint64),
(unsigned char *) &watM);
}
}
}
}
......
......@@ -587,6 +587,25 @@ int do_iio(const cmdlineParser & args)
QThread::msleep(1);
continue;
}
else if (total_points_left<0)
{
if (i_txWaterMark>0)
{
qint64 watM = stdin_pos[0] - tx_pos[0];
if (tx_channel_count>1)
{
qint64 wat2 = stdin_pos[1] - tx_pos[1];
if (wat2 < watM)
watM = wat2;
}
TASKBUS::push_subject(
i_txWaterMark,
instance,
sizeof(qint64),
(unsigned char *) &watM);
}
}
for (int ch=0;ch<tx_channel_count && can_send;++ch)
{
SPTYPE * buf_tx_ptr = buf_tx_array[ch].data();
......@@ -633,22 +652,6 @@ int do_iio(const cmdlineParser & args)
//tx_meta->tx_metadata_ctmstmppp.start_of_burst = false;
for(int ch = 0;ch<tx_channel_count;++ch)
tx_pos[ch] += num_sps_sent;
if (i_txWaterMark>0)
{
qint64 watM = stdin_pos[0] - tx_pos[0];
if (tx_channel_count>1)
{
qint64 wat2 = stdin_pos[1] - tx_pos[1];
if (wat2 < watM)
watM = wat2;
}
TASKBUS::push_subject(
i_txWaterMark,
instance,
sizeof(qint64),
(unsigned char *) &watM);
}
}
//Burst
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册