mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-25 15:50:03 +02:00
wip
This commit is contained in:
parent
2b0989ecaf
commit
46ddf8ef90
@ -3725,7 +3725,7 @@ int program_fpga(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logINFOBLUE, ("Program size is: %lld\n",
|
LOG(logINFOBLUE, ("Program size is: %lld\n",
|
||||||
(long long unsigned int)filesize));
|
(long long unsigned int)filesize));
|
||||||
fpgasrc = malloc(MAX_FPGAPROGRAMSIZE);
|
fpgasrc = malloc(filesize);
|
||||||
//fpgasrc = malloc(filesize + 1);
|
//fpgasrc = malloc(filesize + 1);
|
||||||
uint64_t totalsize = filesize;
|
uint64_t totalsize = filesize;
|
||||||
|
|
||||||
@ -3736,9 +3736,11 @@ int program_fpga(int file_des) {
|
|||||||
uint64_t unitprogramsize = MAX_FPGAPROGRAMSIZE; // 2mb
|
uint64_t unitprogramsize = MAX_FPGAPROGRAMSIZE; // 2mb
|
||||||
if (unitprogramsize > filesize) // less than 2mb
|
if (unitprogramsize > filesize) // less than 2mb
|
||||||
unitprogramsize = filesize;
|
unitprogramsize = filesize;
|
||||||
LOG(logINFOBLUE, ("unit size to receive is:%lld [ooffset:%lld, filesize:%lld]\n",
|
LOG(logINFOBLUE,
|
||||||
|
("unit size to receive is:%lld [offset:%lld, filesize:%lld]\n",
|
||||||
(long long unsigned int)unitprogramsize,
|
(long long unsigned int)unitprogramsize,
|
||||||
(long long unsigned int)offset, (long long unsigned int)filesize));
|
(long long unsigned int)offset,
|
||||||
|
(long long unsigned int)filesize));
|
||||||
|
|
||||||
// receive part of program
|
// receive part of program
|
||||||
if (receiveData(file_des, fpgasrc, unitprogramsize, OTHER) < 0) {
|
if (receiveData(file_des, fpgasrc, unitprogramsize, OTHER) < 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user