D-TACQ / AFHBA404

Linux host device driver for AFHBA404 and MTCA PCIe
GNU General Public License v2.0
3 stars 8 forks source link

Fixed error with incorrect values passed to isramp when dio is present #125

Closed sambelltacq closed 1 month ago

sambelltacq commented 1 month ago
modified:   HAPI/hts_multistream.py
petermilne commented 1 month ago

Hello Sam

This patch too cryptic.

MINOR issue: (total_channels % 2 > 0) could be total_channels%2 but that's not really the problem, the problem is that you're building up something to tear it down again.

I think something like this would be clearer, because it states directly what you're trying to achieve:

data_col32 = 0 for site in uut.sites: data_col32 += int(uut.svc['s{s}'].NCHAN) // (1 if uut.svc['s{s}'].data32 == 1 else 2)

And, yes, there probably should be better syntax for "uut.svc['s{s}']"

Cheers

Peter

On Fri, 4 Oct 2024 at 16:20, sambelltacq @.***> wrote:

modified: HAPI/hts_multistream.py


You can view, comment on, or merge this pull request online at:

https://github.com/D-TACQ/AFHBA404/pull/125 Commit Summary

File Changes

(1 file https://github.com/D-TACQ/AFHBA404/pull/125/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/D-TACQ/AFHBA404/pull/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXGPE43ZPBUESP3IKBHT2DZZ2W2FAVCNFSM6AAAAABPMDCP3KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DMNRSGY3TOOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Peter Milne, Director of Sales www.d-tacq.com

petermilne commented 1 month ago

for s in uut.get_aggregator_sites(): svc = uut.modules[int(s)] data_col32 += int(svc.NCHAN) // (1 if svc.data32 == '1' else 2)

On Fri, 4 Oct 2024 at 17:08, Peter Milne @.***> wrote:

Hello Sam

This patch too cryptic.

MINOR issue: (total_channels % 2 > 0) could be total_channels%2 but that's not really the problem, the problem is that you're building up something to tear it down again.

I think something like this would be clearer, because it states directly what you're trying to achieve:

data_col32 = 0 for site in uut.sites: data_col32 += int(uut.svc['s{s}'].NCHAN) // (1 if uut.svc['s{s}'].data32 == 1 else 2)

And, yes, there probably should be better syntax for "uut.svc['s{s}']"

Cheers

Peter

On Fri, 4 Oct 2024 at 16:20, sambelltacq @.***> wrote:

modified: HAPI/hts_multistream.py


You can view, comment on, or merge this pull request online at:

https://github.com/D-TACQ/AFHBA404/pull/125 Commit Summary

File Changes

(1 file https://github.com/D-TACQ/AFHBA404/pull/125/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/D-TACQ/AFHBA404/pull/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXGPE43ZPBUESP3IKBHT2DZZ2W2FAVCNFSM6AAAAABPMDCP3KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DMNRSGY3TOOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Peter Milne, Director of Sales www.d-tacq.com

-- Peter Milne, Director of Sales www.d-tacq.com

petermilne commented 1 month ago

data_col32 for svc in uut.get_aggregator_svc_list(): data_col32 += int(svc.NCHAN) // (1 if svc.data32 == '1' else 2)

needs a HAPI update: To github.com:D-TACQ/acq400_hapi.git f62b845..0d1340d master -> master

On Fri, 4 Oct 2024 at 17:14, Peter Milne @.***> wrote:

for s in uut.get_aggregator_sites(): svc = uut.modules[int(s)] data_col32 += int(svc.NCHAN) // (1 if svc.data32 == '1' else 2)

On Fri, 4 Oct 2024 at 17:08, Peter Milne @.***> wrote:

Hello Sam

This patch too cryptic.

MINOR issue: (total_channels % 2 > 0) could be total_channels%2 but that's not really the problem, the problem is that you're building up something to tear it down again.

I think something like this would be clearer, because it states directly what you're trying to achieve:

data_col32 = 0 for site in uut.sites: data_col32 += int(uut.svc['s{s}'].NCHAN) // (1 if uut.svc['s{s}'].data32 == 1 else 2)

And, yes, there probably should be better syntax for "uut.svc['s{s}']"

Cheers

Peter

On Fri, 4 Oct 2024 at 16:20, sambelltacq @.***> wrote:

modified: HAPI/hts_multistream.py


You can view, comment on, or merge this pull request online at:

https://github.com/D-TACQ/AFHBA404/pull/125 Commit Summary

File Changes

(1 file https://github.com/D-TACQ/AFHBA404/pull/125/files)

Patch Links:

— Reply to this email directly, view it on GitHub https://github.com/D-TACQ/AFHBA404/pull/125, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXGPE43ZPBUESP3IKBHT2DZZ2W2FAVCNFSM6AAAAABPMDCP3KVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3DMNRSGY3TOOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Peter Milne, Director of Sales www.d-tacq.com

-- Peter Milne, Director of Sales www.d-tacq.com

-- Peter Milne, Director of Sales www.d-tacq.com