Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VolumeControl] Rewrite and refactor VolumeControl code #3410

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

IanSav
Copy link
Contributor

@IanSav IanSav commented Aug 27, 2024

[StartEnigma.py]

  • Save the current volume state once on shutdown of Enigma2 rather than saving the volume on every step/change.

[AVSwitch.py]

  • Remove the duplicated volume control code.

[VolumeControl.py]

  • Rewrite and simplify the code.
  • Remove some of the Python code and use the existing C++ code in eDVBVolumecontrol.
  • Don't remember the current volume but rather get it directly from the C++ code. This resolves issues where some code communicates directly with the C++ code.
  • Save the mute state over shutdown, reboots, and GUI restarts. If mute was active when Enigma2 was ended then mute will be activated on restart. The mute icon will be shown and remain on the screen to warn users that mute is active.
  • Allow the mute and volume control screens to time out from 1 to 10 seconds (user selectable) and respect the user's selection.
  • Allow the volume steps on a single press of VOL-/+ to be defined from 1 to 10 (user selectable) per button press.
  • Allow the rate of volume change to be accelerated to a rate defined from 1 to 10 (user selectable) when the VOL-/+ button is long pressed. When the button is released the single button press rate is restored.
  • Allow the mute icon to remain on screen by long pressing the MUTE button. It will hide on pressing MUTE again or VOL-/+.

[InfoBarGenerics.py]

  • Use the updated method names in VolumeControl.py.

[Mute.py]
[Volume.py]
[VolumeControl.py]

  • Fold Mute.py and Volume.py screens into a new screen VolumeControl.py.

[keymap.xml]

  • Add new action map entries for long VOL-/+ and the VOL-/+ Stop events.

[setup.xml]

  • Remove old settings and replace them with the new setting.

IanSav and others added 2 commits August 27, 2024 22:23
[StartEnigma.py]
- Save the current volume state once on shutdown of Enigma2 rather than saving the volume on every step/change.

[AVSwitch.py]
- Remove the duplicated volume control code.

[VolumeControl.py]
- Rewrite and simplify the code.
- Remove some of the Python code and use the existing C++ code in eDVBVolumecontrol.
- Don't remember the current volume but rather get it directly from the C++ code. This resolves issues where some code communicates directly with the C++ code.
- Save the mute state over shutdown, reboots, and GUI restarts. If mute was active when Enigma2 was ended then mute will be activated on restart. The mute icon will be shown and remain on the screen to warn users that mute is active.
- Allow the mute and volume control screens to time out from 1 to 10 seconds (user selectable) and respect the user's selection.
- Allow the volume steps on a single press of VOL-/+ to be defined from 1 to 10 (user selectable) per button press.
- Allow the rate of volume change to be accelerated to a rate defined from 1 to 10 (user selectable) when the VOL-/+ button is long pressed. When the button is released the single button press rate is restored.
- Allow the mute icon to remain on screen by long pressing the MUTE button. It will hide on pressing MUTE again or VOL-/+.

[InfoBarGenerics.py]
- Use the updated method names in VolumeControl.py.

[Mute.py]
[Volume.py]
[VolumeControl.py]
- Fold Mute.py and Volume.py screens into a new screen VolumeControl.py.

[keymap.xml]
- Add new action map entries for long VOL-/+ and the VOL-/+ Stop events.

[setup.xml]
- Remove old settings and replace them with the new setting.
Copy link

sonarcloud bot commented Aug 27, 2024

@jbleyel jbleyel merged commit 6cdac1e into master Aug 27, 2024
3 checks passed
@jbleyel jbleyel deleted the IanSav-VolumeControl branch August 27, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants