StephenBlackWasAlreadyTaken / xDrip-Experimental

Experimental Branches for Collaboration on DexDrip
GNU General Public License v3.0
25 stars 62 forks source link

low battery warning not removed #289

Open JohanDegraeve opened 8 years ago

JohanDegraeve commented 8 years ago

I had a low battery warning (finally reached 204), replace the transmitter, but the low level battery warning stays. The only way to remove it was to disable the battery warning in the settings, stop the application and relaunch it. I notice in https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/blob/master/app/src/main/java/com/eveningoutpost/dexdrip/Models/Sensor.java#L98 as long as sensor.latest_battery_level is not set to 0, the alarm will stay. So I think while installating a new transmitter (ie while changing the transmitter id) the sensor.latest_battery_level is not set to 0. Note that I use as hardware source "Bluetooth Wixel" because I have an xdrip without resistors. But the change the transmitter id on the xdrip, i switch it to xBridge Wixel, change the id, then back to bluetooth wixel.

AdrianLxM commented 8 years ago

The only way to remove it was to disable the battery warning in the settings, stop the application and relaunch it.

I thought it would update once the main activity would get rendered again. So it should not need to stop the app but just to do something that will force a rerender. Going to the home screen and tapping the widget, ...

Did you stop the sensor session and start a new one and the message was still there? (Officially you are not allowed to remove the transmitter from a sensor anyways, as long as the sensor is still under the skin) ;) .

tzachi-dar commented 8 years ago

Dexcom forces one not to switch transmitter when sensor is active.

We don't force it, so here is where the confusion starts. Perhaps we can detect a sensor change (on inputs that bring the sensor) and than do a reset of transmitter battery.

Thanks Tzachi

On Sun, Mar 6, 2016 at 11:35 AM, AdrianLxM notifications@github.com wrote:

The only way to remove it was to disable the battery warning in the settings, stop the application and relaunch it.

I thought it would update once the main activity would get rendered again. So it should not need to stop the app but just to do something that will force a rerender. Going to the home screen and tapping the widget, ...

Did you stop the sensor session and start a new one and the message was still there? (Officially you are not allowed to remove the transmitter from a sensor anyways, as long as the sensor is still under the skin) ;) .

— Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/289#issuecomment-192851223 .

JohanDegraeve commented 8 years ago

Actually both transmitter and sensor were changed at the same time.

I can still reproduce it, as soon as i uncheck "disable battery warning", the message comes back, then I need to check the setting, and kill the application, and relaunch it.

I think the battery level needs to be reset (to 0 ?) when the app detects a new transmitter id

AdrianLxM commented 8 years ago

May it have happened, that still one package of the old transmitter came in (the wixel was not reprogrammed e.g.) after having started the new sensor?

AdrianLxM commented 8 years ago

In case you want to test restarting a sensor again, you can export the database, do the test and then reimport the one before pressing "stop sensor".

tzachi-dar commented 8 years ago

Auto detecting the transmitter is not easy since not all xDrip source pass this information. If one is using the xBridge for example, this should be easy, but for xDrip it is impossible.

On Sun, Mar 6, 2016 at 7:07 PM, AdrianLxM notifications@github.com wrote:

In case you want to test restarting a sensor again, you can export the database, do the test and then reimport the one before pressing "stop sensor".

— Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/289#issuecomment-192937131 .

JohanDegraeve commented 8 years ago

@AdrianLxM probably I first restarted the new sensor and only later I realized that I still had to change the transmitter id so that was done later.

I think for xdrip there should be a reset option, so that the user can reset the battery level to 0 (which is the initial state). And for xbridge, the app could reset the battery level to 0 as soon as a new transmitter id is set.

jstevensog commented 8 years ago

Not wanting to push my own barrel, but this is another reason why we need to deprecate the xDrip wixel as a bridge. Might still be used in other ways, but as a pure bridge, we should move to xBridge for the usability. And it can be modified in any number of ways to suit whatever people want. Cheers

On Mon, Mar 7, 2016 at 8:36 AM, Johan Degraeve notifications@github.com wrote:

@AdrianLxM https://github.com/AdrianLxM probably I first restarted the new sensor and only later I realized that I still had to change the transmitter id so that was done later.

I think for xdrip there should be a reset option, so that the user can reset the battery level to 0 (which is the initial state). And for xbridge, the app could reset the battery level to 0 as soon as a new transmitter id is set.

— Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/289#issuecomment-193001806 .

John Stevens "You are how you live, not what you have."

tzachi-dar commented 8 years ago

I agree that we should not support two fw versions, that said, we have a legacy of users to support.

The minimal thing that we should do is change documentation so new users will only use xBridge.

On Mon, Mar 7, 2016 at 12:01 AM, John notifications@github.com wrote:

Not wanting to push my own barrel, but this is another reason why we need to deprecate the xDrip wixel as a bridge. Might still be used in other ways, but as a pure bridge, we should move to xBridge for the usability. And it can be modified in any number of ways to suit whatever people want. Cheers

On Mon, Mar 7, 2016 at 8:36 AM, Johan Degraeve notifications@github.com wrote:

@AdrianLxM https://github.com/AdrianLxM probably I first restarted the new sensor and only later I realized that I still had to change the transmitter id so that was done later.

I think for xdrip there should be a reset option, so that the user can reset the battery level to 0 (which is the initial state). And for xbridge, the app could reset the battery level to 0 as soon as a new transmitter id is set.

— Reply to this email directly or view it on GitHub < https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/289#issuecomment-193001806

.

John Stevens "You are how you live, not what you have."

— Reply to this email directly or view it on GitHub https://github.com/StephenBlackWasAlreadyTaken/xDrip-Experimental/issues/289#issuecomment-193004998 .