ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: e794e5a0e6444204d90804d23b3965b448b77d31
Parent: cbc2a53fa980b6b7d1727806a8b476a43cbc4372
Author: Randy Palamar
Date:   Sat,  7 Jun 2025 12:55:42 -0600

lib: fix incorrect result testing in old set_beamformer_parameters function

Diffstat:
Mhelpers/ogl_beamformer_lib.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/helpers/ogl_beamformer_lib.c b/helpers/ogl_beamformer_lib.c @@ -376,16 +376,16 @@ beamformer_push_parameters_head(BeamformerParametersHead *bp, i32 timeout_ms) b32 set_beamformer_parameters(BeamformerParametersV0 *new_bp) { - b32 result = 0; - result |= beamformer_push_channel_mapping((i16 *)new_bp->channel_mapping, + b32 result = 1; + result &= beamformer_push_channel_mapping((i16 *)new_bp->channel_mapping, countof(new_bp->channel_mapping), 0); - result |= beamformer_push_sparse_elements((i16 *)new_bp->uforces_channels, + result &= beamformer_push_sparse_elements((i16 *)new_bp->uforces_channels, countof(new_bp->uforces_channels), 0); v2 focal_vectors[256]; - for (u32 i = 0; i < ARRAY_COUNT(focal_vectors); i++) + for (u32 i = 0; i < countof(focal_vectors); i++) focal_vectors[i] = (v2){{new_bp->transmit_angles[i], new_bp->focal_depths[i]}}; - result |= beamformer_push_focal_vectors((f32 *)focal_vectors, countof(focal_vectors), 0); - result |= beamformer_push_parameters((BeamformerParameters *)&new_bp->xdc_transform, 0); + result &= beamformer_push_focal_vectors((f32 *)focal_vectors, countof(focal_vectors), 0); + result &= beamformer_push_parameters((BeamformerParameters *)&new_bp->xdc_transform, 0); return result; }