Fixed crash in drone when inter packet/burst gap > 1 sec.
This commit is contained in:
parent
f132e3118c
commit
7532a1d576
@ -129,21 +129,21 @@ void AbstractPort::updatePacketList()
|
|||||||
if (streamList_[i]->isEnabled())
|
if (streamList_[i]->isEnabled())
|
||||||
{
|
{
|
||||||
long numPackets, numBursts;
|
long numPackets, numBursts;
|
||||||
long ibg, ipg;
|
long ibg = 0, ipg = 0;
|
||||||
|
|
||||||
switch (streamList_[i]->sendUnit())
|
switch (streamList_[i]->sendUnit())
|
||||||
{
|
{
|
||||||
case OstProto::StreamControl::e_su_bursts:
|
case OstProto::StreamControl::e_su_bursts:
|
||||||
numBursts = streamList_[i]->numBursts();
|
numBursts = streamList_[i]->numBursts();
|
||||||
numPackets = streamList_[i]->burstSize();
|
numPackets = streamList_[i]->burstSize();
|
||||||
ibg = 1000000/streamList_[i]->burstRate();
|
if (streamList_[i]->burstRate() > 0)
|
||||||
ipg = 0;
|
ibg = 1000000/streamList_[i]->burstRate();
|
||||||
break;
|
break;
|
||||||
case OstProto::StreamControl::e_su_packets:
|
case OstProto::StreamControl::e_su_packets:
|
||||||
numBursts = 1;
|
numBursts = 1;
|
||||||
numPackets = streamList_[i]->numPackets();
|
numPackets = streamList_[i]->numPackets();
|
||||||
ibg = 0;
|
if (streamList_[i]->packetRate() > 0)
|
||||||
ipg = 1000000/streamList_[i]->packetRate();
|
ipg = 1000000/streamList_[i]->packetRate();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qWarning("Unhandled stream control unit %d",
|
qWarning("Unhandled stream control unit %d",
|
||||||
|
Loading…
Reference in New Issue
Block a user