[Bug]: Preset recall ignores current channel selection #9

Closed
opened 2026-04-17 11:32:43 +00:00 by tgohle · 1 comment
Owner

Problem

on_recall_slot() sends the raw stored BSWV string directly:

self.i.write(b)

Why this is a bug

The stored preset string already contains the original channel prefix, for example:

C1:BSWV WVTP,SINE,...

If the user later selects C2 in the UI and recalls that preset, the command can still go to C1 instead of the currently selected channel.

Fix approach

Do not send the stored command string unchanged.

Instead:

  • strip the stored channel prefix
  • rebuild the command with the currently selected channel
  • or warn clearly that presets are channel-bound

Preferred behaviour is to re-prefix based on the current UI channel.

Status

Still open.
Not fixed in the current v0.2 working copy.

### Problem `on_recall_slot()` sends the raw stored `BSWV` string directly: ```python self.i.write(b) ``` ### Why this is a bug The stored preset string already contains the original channel prefix, for example: ```text C1:BSWV WVTP,SINE,... ``` If the user later selects `C2` in the UI and recalls that preset, the command can still go to `C1` instead of the currently selected channel. ### Fix approach Do not send the stored command string unchanged. Instead: - strip the stored channel prefix - rebuild the command with the currently selected channel - or warn clearly that presets are channel-bound Preferred behaviour is to re-prefix based on the current UI channel. ### Status Still open. Not fixed in the current v0.2 working copy.
tgohle added the
kind
bug
1
area/presets
severity
medium
2
state
confirmed
2
labels 2026-04-17 11:47:04 +00:00
tgohle self-assigned this 2026-04-17 12:09:17 +00:00
tgohle changed title from Preset recall ignores current channel selection to [Bug]: Preset recall ignores current channel selection 2026-04-18 11:18:23 +00:00
Author
Owner

Fixed in v0.2.3.

Preset recall no longer applies the stored BSWV command unchanged with its original channel prefix.
The recall path now strips any stored channel prefix and rebuilds the command for the currently selected UI channel.

Verification

Tested successfully on real hardware.

Because only one active connection to the SDG was practical during the test, verification was done manually in the GUI instead of with the helper test script:

  • stored preset on C1
  • changed C1 to a different waveform
  • switched GUI selection to C2
  • recalled the preset
  • confirmed the recalled settings were applied to C2

Version can be found in archive for V0.2.3

Fixed in **v0.2.3**. Preset recall no longer applies the stored `BSWV` command unchanged with its original channel prefix. The recall path now strips any stored channel prefix and rebuilds the command for the **currently selected UI channel**. ## Verification Tested successfully on real hardware. Because only one active connection to the SDG was practical during the test, verification was done **manually in the GUI** instead of with the helper test script: - stored preset on **C1** - changed **C1** to a different waveform - switched GUI selection to **C2** - recalled the preset - confirmed the recalled settings were applied to **C2** Version can be found in archive for [V0.2.3](https://gitea.togo-lab.io/tgohle/0003-SDG2042X-PyQt-GUI-for-Linux/src/branch/master/script/archive)
tgohle added this to the Close all Bugs higer or equal "Medium" milestone 2026-04-20 12:37:34 +00:00
Sign in to join this conversation.
No description provided.