diff --git a/firmware/console/binary/tunerstudio_io.cpp b/firmware/console/binary/tunerstudio_io.cpp index 8faeb6d317..5843706692 100644 --- a/firmware/console/binary/tunerstudio_io.cpp +++ b/firmware/console/binary/tunerstudio_io.cpp @@ -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__) diff --git a/firmware/rusefi.cpp b/firmware/rusefi.cpp index a4ee1b227e..b9ff90bf15 100644 --- a/firmware/rusefi.cpp +++ b/firmware/rusefi.cpp @@ -272,5 +272,5 @@ int getRusEfiVersion(void) { if (initBootloader() != 0) return 123; #endif /* EFI_BOOTLOADER_INCLUDE_CODE */ - return 20180124; + return 20180125; }