This commit is contained in:
John Goerzen 2019-11-03 19:36:00 -06:00
parent 9630e07db9
commit 00ac861fc7
1 changed files with 4 additions and 0 deletions

View File

@ -197,6 +197,10 @@ impl LoraStik {
tosend.append(&mut data.clone());
let mut data = tosend; // hide the original 'data'
if data.len() > self.maxpacketsize {
self.extradata = data.split_off(self.maxpacketsize);
}
while data.len() < self.maxpacketsize && self.extradata.is_empty() {
// Consider the next packet - maybe we can combine it with this one.
let r = self.txblocksrx.try_recv();