mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
wip
This commit is contained in:
parent
a718d69368
commit
f1b31100db
@ -3725,14 +3725,6 @@ int program_fpga(int file_des) {
|
||||
LOG(logDEBUG1,
|
||||
("Program size is: %lld\n", (long long unsigned int)filesize));
|
||||
|
||||
// checksum
|
||||
uint16_t checksum = 0;
|
||||
if (receiveData(file_des, &checksum, sizeof(filesize), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
LOG(logINFOBLUE,
|
||||
("checksum: %d\n", checksum));
|
||||
|
||||
|
||||
// open file and allocate memory for part program
|
||||
FILE *fd = NULL;
|
||||
ret = startCopyingFPGAProgram(&fd, filesize, mess);
|
||||
|
@ -1323,11 +1323,15 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname,
|
||||
}
|
||||
}
|
||||
// Swap bits from source and write to dest
|
||||
int oldProgress = 0;
|
||||
while (!feof(src)) {
|
||||
// print progress
|
||||
printf("%d%%\r", (int)(((double)(dstFilePos) / srcSize) * 100));
|
||||
int progress = (int)(((double)(dstFilePos) / srcSize) * 100);
|
||||
if (oldProgress != progress) {
|
||||
printf("%d%%\r", );
|
||||
fflush(stdout);
|
||||
|
||||
oldProgress = progress;
|
||||
}
|
||||
// pof: exit early to discard footer
|
||||
if (isPof && dstFilePos >= pofFooterOfst) {
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user