Coder Social home page Coder Social logo

Battery Status Empty about loop HOT 19 CLOSED

loopkit avatar loopkit commented on July 18, 2024
Battery Status Empty

from loop.

Comments (19)

scottleibrand avatar scottleibrand commented on July 18, 2024 1

We could certainly make is a 3-way selection: unspecified, alkaline, or lithium. If unspecified (default) we use an average decay curve that does something reasonable for both. If specified, we can be more accurate...

from loop.

tomasboudr avatar tomasboudr commented on July 18, 2024 1

That looks good! Nice work.

from loop.

loudnate avatar loudnate commented on July 18, 2024

This is a know issue with the x22 pumps. @jlucasvt has started documenting the time-voltage curve for a lithium battery. I'm hoping someone can do the same for an alkaline as well.

from loop.

ashrind avatar ashrind commented on July 18, 2024

@loudnate Thanks for the answer!

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

I'm finally committed to gathering Alkaline data. Should have it mapped out in about a week.

from loop.

tomasboudr avatar tomasboudr commented on July 18, 2024

Awesome that this is getting some love! Always wondered why the battery was blank since you could see the voltage in pump status on a x22.

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

Alkaline and Lithium Battery data.

https://docs.google.com/spreadsheets/d/19FpO5YO5ewQrdph_4iIXuear6xRGzl-AYTiFeHwPcVk/edit?usp=sharing

from loop.

loudnate avatar loudnate commented on July 18, 2024

Very awesome!

from loop.

loudnate avatar loudnate commented on July 18, 2024

@jlucasvt my personal recommendation would be to expose a voltage-to-percentage remaining function on the PumpModel enum in MinimedKit, in the rileylink_ios repo.

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

Yes if we use the linear eq's it should be pretty simple. I I did do a quick run with excel to generate a 4th Ord Polynomial Eq for both but they may be a bit overboard..

screen shot 2016-09-25 at 10 45 21 am

from loop.

loudnate avatar loudnate commented on July 18, 2024

Ideally there is no user setting for choosing their battery type.

from loop.

tomasboudr avatar tomasboudr commented on July 18, 2024

I agree with you nate, ideally - but if its tricky to detect in software, you have to realize its a switch that will be used very rarely. I would rather time be spent on other things and there be a switch.

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

Yeah , My one touch ping made you choose on battery swap (ALK or LITH). It will be ideal to not worry about the battery type.

In the past I wired this up in the DeviceDataManager.assertCurrentPumpData just after battery state is retrieved and before NSUpload.

if let sentrySupported = self.pumpState?.pumpModel?.larger , !sentrySupported {
     self.setBatteryStatusforNonMySentryPumps(voltage: status.batteryVolts)
}

I am going to start here and and then will need some guidance on the next steps

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

Updated to latest v1.1 Loop Code Testing this week and will do a PR.

https://github.com/jlucasvt/Loop/tree/master-1.1-x22BatteryStatus

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

Doing some testing now with battery and alerts. It's working pretty good.

x22 Battery Inidication

img_6151

Lithium Enable Switch

img_6152

from loop.

ashrind avatar ashrind commented on July 18, 2024

This is awesome!

from loop.

jlucasvt avatar jlucasvt commented on July 18, 2024

I have rebuilt the UI to allow selection of Alkaline or Lithium and a description explaining the difference for the user. I've made all the requested changes from my last PR and hopefully it will be accepted this time. Here is the current source it's based on dev 1.1.1

https://github.com/jlucasvt/Loop/tree/dev-1.1.1-x22BatteryStatus

img_6206

from loop.

ps2 avatar ps2 commented on July 18, 2024

More lithium battery history:
devicestatus

from loop.

tomasboudr avatar tomasboudr commented on July 18, 2024

This is working... One minor note though is that in practice with normal Duracell (alkalines) my battery has lasted 30-40% (ballpark) longer than loop's current algorithm predicts. I have had it warm me for 0% and the pump still had 2/4 bars on the battery meter.

from loop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.