Skip to content

Commit 109b04b

Browse files
committed
Merge branch 'disk-readers' into ibverb-support
2 parents 15ef4d2 + 4347ab9 commit 109b04b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/formats/cor.hpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019, The Bifrost Authors. All rights reserved.
2+
* Copyright (c) 2019-2021, The Bifrost Authors. All rights reserved.
33
*
44
* Redistribution and use in source and binary forms, with or without
55
* modification, are permitted provided that the following conditions
@@ -62,6 +62,7 @@ class CORDecoder : virtual public PacketDecoder {
6262
const cor_hdr_type* pkt_hdr = (cor_hdr_type*)pkt_ptr;
6363
const uint8_t* pkt_pld = pkt_ptr + sizeof(cor_hdr_type);
6464
int pld_size = pkt_size - sizeof(cor_hdr_type);
65+
uint8_t nchan_decim = (be32toh(pkt_hdr->frame_count_word) >> 16) & 0xFF;
6566
uint8_t nserver = (be32toh(pkt_hdr->frame_count_word) >> 8) & 0xFF;
6667
uint8_t server = be32toh(pkt_hdr->frame_count_word) & 0xFF;
6768
uint16_t nchan_pkt = (pld_size/(8*4));
@@ -76,7 +77,7 @@ class CORDecoder : virtual public PacketDecoder {
7677
pkt->src = (stand0*(2*(nstand-1)+1-stand0)/2 + stand1 + 1 - _src0)*nserver \
7778
+ (server - 1);
7879
pkt->chan0 = be16toh(pkt_hdr->first_chan) \
79-
- nchan_pkt * (server - 1);
80+
- nchan_decim*nchan_pkt * (server - 1);
8081
pkt->nchan = nchan_pkt;
8182
pkt->tuning = (nserver << 8) | (server - 1); // Stores the number of servers and
8283
// the server that sent this packet

0 commit comments

Comments
 (0)