temp funny code for puff #553
This commit is contained in:
parent
6eebf66564
commit
b9c22bdff4
|
@ -167,7 +167,19 @@ void sr5WriteData(ts_channel_s *tsChannel, const uint8_t * buffer, int size) {
|
|||
#else
|
||||
if (tsChannel->channel == NULL)
|
||||
return;
|
||||
int transferred = chnWriteTimeout(tsChannel->channel, buffer, size, BINARY_IO_TIMEOUT);
|
||||
|
||||
// int transferred = chnWriteTimeout(tsChannel->channel, buffer, size, BINARY_IO_TIMEOUT);
|
||||
// temporary attempt to work around #553
|
||||
// instead of one huge packet let's try sending a few smaller packets
|
||||
int transferred = 0;
|
||||
int stillToTransfer = size;
|
||||
while (stillToTransfer > 0) {
|
||||
int thisTransferSize = minI(stillToTransfer, 1024);
|
||||
transferred += chnWriteTimeout(tsChannel->channel, buffer, thisTransferSize, BINARY_IO_TIMEOUT);
|
||||
buffer += thisTransferSize;
|
||||
stillToTransfer -= thisTransferSize;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if EFI_SIMULATOR || defined(__DOXYGEN__)
|
||||
|
|
|
@ -272,5 +272,5 @@ int getRusEfiVersion(void) {
|
|||
if (initBootloader() != 0)
|
||||
return 123;
|
||||
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
|
||||
return 20180124;
|
||||
return 20180125;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue