Wave Generator: phase cannot be selected for first waveform
Closed this issue · 5 comments
Actual Behaviour
If Wave1 (analog wave) or SQR1 (digital wave) is selected, tapping the Phase-button has no effect.
Expected Behaviour
If this is due to hardware limitations, then the button should be disabled (greyed out).
If this is not due to hardware limitations, then it should be possible to select phase and change it via the seekbar.
Steps to reproduce it
- Open app
- Choose Wave Generator
- Tap Wave1 button
- Tap Phase button
or
- Open app
- Choose Wave Generator
- Tap Digital button
- Tap SQR1 button
- Tap Phase button
Would you like to work on the issue?
Maybe
@marcnause As I can see in the code, the phase for Wave1 (analog wave) and SQR1 (digital wave) has purposely been disabled. I am not sure if this is due to hardware limitations.
@AsCress If I find the time, I will dig through the PSLab Python library which is well documented to find out if it is a hardware limitation.
OK, I checked the Python library and the comments in https://github.com/fossasia/pslab-python/blob/development/pslab/instrument/waveform_generator.py were very enlightening:
Phase between waveforms when generating waveforms on both SI1 and SI2 in degrees. The default is 0.
The same is true for digital waveforms.
I think it would be a good to color the button grey when it is disabled. Currently it is not possible to tell apart if a button is bright red because it is not in active state or if it is disabled.
Right. I think that we should make the phase buttons invisible for the waveforms which don't support a phase change, to differentiate between inactive and disabled. Does that sound right ? @marcnause @CloudyPadmal