sync
This commit is contained in:
@@ -107,7 +107,7 @@ int put_binary_file(const char *filename, ssize_t filesize, uint32_t expected_cr
|
||||
}
|
||||
else if (read == 0)
|
||||
{
|
||||
if (retry_count > 10)
|
||||
if (retry_count >= 10)
|
||||
{
|
||||
LOG_ERR("No data received from USB after multiple attempts");
|
||||
fs_close(&file);
|
||||
@@ -115,7 +115,7 @@ int put_binary_file(const char *filename, ssize_t filesize, uint32_t expected_cr
|
||||
}
|
||||
|
||||
usb_resume_rx();
|
||||
LOG_DBG("No data available from USB, waiting for data... (attempt %u)", retry_count + 1);
|
||||
// LOG_DBG("No data available from USB, waiting for data... (attempt %u)", retry_count + 1);
|
||||
|
||||
if (bytes_written == 0)
|
||||
{
|
||||
@@ -140,6 +140,7 @@ int put_binary_file(const char *filename, ssize_t filesize, uint32_t expected_cr
|
||||
running_crc32 = crc32_ieee_update(running_crc32, buffer, written);
|
||||
|
||||
bytes_written += written;
|
||||
retry_count = 0;
|
||||
}
|
||||
uint32_t duration = k_uptime_get_32() - start;
|
||||
uint32_t kb_per_s = (filesize * 1000) / (duration * 1024 +1);
|
||||
|
||||
Reference in New Issue
Block a user