Skip to content

Commit

Permalink
fix show, enable and sound speed setting
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed Jun 28, 2024
1 parent d62d5f4 commit 614f2f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion simulator/src/view/imgui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl ImGuiViewer {
std::f32::MAX / 2.,
) {
cpus.iter().for_each(|cpu| {
sources.drives_mut().skip(body_pointer[cpu.idx()]).for_each(
sources.drives_mut().skip(body_pointer[cpu.idx()]).take(cpu.num_transducers()).for_each(
|s| {
s.set_wave_number(
cpu.fpga().ultrasound_freq(),
Expand Down Expand Up @@ -463,6 +463,7 @@ impl ImGuiViewer {
sources
.visibilities_mut()
.skip(body_pointer[i])
.take(cpu.num_transducers())
.for_each(|s| *s = v);
}
ui.same_line();
Expand All @@ -472,6 +473,7 @@ impl ImGuiViewer {
sources
.drives_mut()
.skip(body_pointer[i])
.take(cpu.num_transducers())
.for_each(|s| s.enable = v);
}
ui.same_line();
Expand Down

0 comments on commit 614f2f6

Please sign in to comment.