temp funny code for puff #553

This commit is contained in:
rusEfi 2018-01-24 21:34:05 -05:00
parent 0a8f81a760
commit 3a275b4388
2 changed files with 14 additions and 2 deletions

View File

@ -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__)

View File

@ -272,5 +272,5 @@ int getRusEfiVersion(void) {
if (initBootloader() != 0)
return 123;
#endif /* EFI_BOOTLOADER_INCLUDE_CODE */
return 20180124;
return 20180125;
}