Skip to content

Commit c002376

Browse files
authored
Merge pull request #2477 from LinuxCNC/halscope-fix-vert-scale
halscope: fix initialization of gain/scale for new channels
2 parents bc386a6 + ce73f6b commit c002376

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/hal/utils/scope_vert.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,11 @@ void channel_changed(void)
10941094
gtk_adjustment_set_lower(adj, chan->min_index);
10951095
gtk_adjustment_set_upper(adj, chan->max_index);
10961096
gtk_adjustment_set_value(adj, chan->scale_index);
1097+
1098+
// Call the `scale_changed()` callback once by hand to initialize
1099+
// the new channel's scale/gain.
1100+
scale_changed(adj, NULL);
1101+
10971102
/* update the channel number and name display */
10981103
snprintf(buf1, BUFLEN, "%2d", vert->selected);
10991104
name = chan->name;

0 commit comments

Comments
 (0)