NightscoutFoundation / xDrip

Nightscout version of xDrip+
https://jamorham.github.io/#xdrip-plus
GNU General Public License v3.0
1.4k stars 1.14k forks source link

Don't delay ascending volume alerts by 3 minutes #1658

Closed Navid200 closed 2 years ago

Navid200 commented 3 years ago

There have already been complaints about not being able to control the alarm volume: https://github.com/NightscoutFoundation/xDrip/issues/813

In response to "please add a low profile as well", the suggested solution has been to use the ascending volume profile. But, that profile starts the volume at "silent". So, if you want to get an alarm when your glucose crosses a threshold, you will have to add the time it takes for the volume to rise from silent to the next level to know when you will really hear the alarm. But, by then, your glucose may be at a different level.

Would you please change the profile so that it would start from very low volume instead of starting from silent?

samhedgerows commented 3 years ago

Personally I like that the ascending volume starts silently - with the "vibrate on alerts" option enabled it starts with vibration only before starting to make a noise. I find the vibration loud enough most of the time, but if I miss it it then starts to make a noise. So I'd definitely not want this functionality to completely disappear.

However with vibrations off the alarm doesn't make any noise for a few minutes - which isn't great as you say. A temporary work-around would be to enable vibrations, if possible.

Navid200 commented 3 years ago

One consequence of the alarm starting silent is that if you tap on test alarm, it makes no sound! Many think there is an error and stop giving the ascending volume a chance.

Are you saying if you have the vibration as you like to set it and also have the minimum volume, instead of silent, it will be too loud for you? The vibration is actually much louder than minimum volume, isn't it?

I'm not asking for the ability to enable vibration to be removed. Only for the sound volume for the selected sound file to start from an extremely low volume instead of completely silent. Would that be a problem?

Navid200 commented 3 years ago

@tzachi-dar @jamorham @AdrianLxM

Looking at the AlertPlayer.java file (from the March 8, 2021 release), I see this: 1 (2)

The if statement on line 530 keeps the alert (for ascending profile only) silent for 3 minutes. Only the vibrate option will function in that period. But, if the user does not choose to enable the vibrate option, the 3-minute delay remains. Then, the user receives no alert in any form for 3 minutes. However, if they choose a medium or high volume profile, they will not experience that delay. Is there a logic behind this discrepancy?

I am happy to create a pull request to make the medium, high and ascending volume profiles neither to have a delay. But, would you please tell me if there is a reason for this and therefore, such a pull request will never be accepted?