Skip to content

Commit

Permalink
Merge pull request #50 from ornlneutronimaging/49-minor-bug-found-in-…
Browse files Browse the repository at this point in the history
…parsing-gdc-packet

Minor fix 44 bits to 48 bits check for GDC packet
  • Loading branch information
KedoKudo authored Oct 17, 2023
2 parents 9b7d193 + dc13281 commit 33af051
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sophiread/FastSophiread/src/tpx3_fast.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ void update_gdc_timestamp_and_timer_lsb32(const char *char_array, unsigned long

// process given GDC packet
gdclast = (unsigned long *)(&char_array[0]);
mygdc = (((*gdclast) >> 16) & 0xFFFFFFFFFFF);
mygdc = (((*gdclast) >> 16) & 0xFFFFFFFFFFFF);

switch (((mygdc >> 40) & 0xF)) {
case 0x4:
Expand Down
2 changes: 1 addition & 1 deletion sophiread/SophireadLib/src/tpx3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ std::vector<Hit> readTimepix3RawData(const std::string &filepath) {
} else if ((data_packet[7] & 0xF0) == 0x40) {
// GDC data packet
gdclast = (unsigned long *)(&data_packet[0]);
mygdc = (((*gdclast) >> 16) & 0xFFFFFFFFFFF);
mygdc = (((*gdclast) >> 16) & 0xFFFFFFFFFFFF);
if (((mygdc >> 40) & 0xF) == 0x4) {
Timer_LSB32 = mygdc & 0xFFFFFFFF; // 32-bit
} else if (((mygdc >> 40) & 0xF) == 0x5) {
Expand Down

0 comments on commit 33af051

Please sign in to comment.