Sigma: Never send empty packets.
This commit is contained in:
parent
afa8f8449a
commit
abda62ced8
|
@ -922,11 +922,13 @@ static int decode_chunk_ts(uint8_t *buf, uint16_t *lastts,
|
||||||
/* Send rest of the chunk to sigrok. */
|
/* Send rest of the chunk to sigrok. */
|
||||||
tosend = n - sent;
|
tosend = n - sent;
|
||||||
|
|
||||||
|
if (tosend > 0) {
|
||||||
packet.type = DF_LOGIC;
|
packet.type = DF_LOGIC;
|
||||||
packet.length = tosend * sizeof(uint16_t);
|
packet.length = tosend * sizeof(uint16_t);
|
||||||
packet.unitsize = 2;
|
packet.unitsize = 2;
|
||||||
packet.payload = samples + sent;
|
packet.payload = samples + sent;
|
||||||
session_bus(sigma->session_id, &packet);
|
session_bus(sigma->session_id, &packet);
|
||||||
|
}
|
||||||
|
|
||||||
*lastsample = samples[n - 1];
|
*lastsample = samples[n - 1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue