Conversation
|
My proposal is to put layers between this way we can change the behavior and only hardly touch the original code We must clearly specify what data is stored and used where like: this must be documented on interfaces |
|
@Philoul read the code if you understand my ideas pls |
|
Proposed Vocabulary:
Proposal of answer on my point of view:
Additional opened topic to be decided:
|
|
I changed VU to CU ...... hard to think about it like about "virtual" when they are "real" |
|
Thinking about to create something like: and use it where we have
|
|
I hope you didn't remove previous code. We will re-use most of it :) |
|
regarding pump history I'd keep only CU. Pump driver should not be aware of concentration at all. It will simplify pump drivers development |
|
regarding storing to DB I'd utilize
Do you agree? Do you see some sideeffects or something I missed? |
I always keep everything ;-) (at least for a long time)... and I'm currrently use it for my loop so no risk to remove it before final architecture...). |
On my PR, (after code refactoring), I created a ConcentrationHelper Interface to group maximum of calculation within a unique class... |
Yes, following this idea, I had in mind to also update ICfg with a new concentration property. (ICfg is already included within EPS class and is miroring InsulinConfiguration). |
Modifying concentration should be synchronized with a Reservoir Change event.
But, Yes, create new ProfileSwitch if concentration change make sense if we include within ProfileSwitch dialog the selection of Profile AND the selection of Insulin (ICfg with Peak, DIA and concentration...)
Do you think we should rework both topics together? |
|
May it would be not necessary to popup ProfileSwitch. We can do it on background. |
|
Regarding insulin management: yes, we should cover both in this preparation and make code ready for that some clean way |
|
5d97c17
|
|
I started to work on update db and ICfg, will update my working branch, compare and provide a first PR. |
|
|
OK, added tasks (on top) |
|
Search code for "@Philoul" . I need your assistance there |
|
Additional tasks to do:
|
|
Additional comment after deeper code analysis, |
|
There is a regression (at least for Virtual Pump) on this branch, ProfileSwitch doesn't work...
So command never arrives to the pump... Note that Boluses or TBR works in VirtualPump... |
|
I have implemented Insulin concentration in Tai. In general the hard part was not putting in a layer between UI <> pump manager <> pump history, but handling the IU increments available at different concentrations for basal profiles, bolus, calculators etc, and especially what happens to basal profile when you change to a higher concentrated insulin. Also I made sure that you can only change the insulin concentration when no pump is attached, as with the different pump models it would be hard to make sure to only do that when changing pod or insulin reservoir or whatnot. But changing insulin concentration in app needs to be tied to physical act of changing insulin. The initial PR was: https://github.com/mountrcg/Trio-dev/pull/2 |
|
@mountrcg concerning UI, the plan is currently:
My proposal for changing concentration will be done in several steps:
If the user doesn't confirm the new concentration, or select a wrong value in number picker, then loop will be disabled (until the confirmation of the right concentration). This is the plan, of course we can adjust everything. UI proposals will be the purpose for the next 2 or 3 PRs 😉 |
Hum, pump disconnection is IMO, on a safety point of view, not the right trigger.
I don't know how it's managed within Trio, but within AAPS, we have a standard interface whatever the pump (Tube, Patch, ...) and dedicated events are rised on different actions, especially when "Insulin has been Changed".
We can trigger this "Insulin Change" event to immediately send a popup window (even above another application if AAPS is in the background during a reservoir change managed in a tube pump) This guarantee the concentration switch is synchronized and allowed only when really a "new insulin" has been put within the system 🤔 |
It seems I don't have a read access to this repo |
@Philoul It’s not Trio, it’s the autoISF fork of Trio. Turning to insulin concentration: We actually chatted about this briefly during the virtual hack (if you remember). Our plan overlaps with quite a lot of what you and Milos are doing here: storing insulin concentration, ideally storing insulin model, i.e., type, per dose, keeping the UI strictly in IU, adding a middleware layer between the pump driver, backend, and oref dosing logic, etc. Happy to dive into details once you’re further along. We're definitely not trying to copy or rip off your work, but I really believe cross-ecosystem collaboration in the community is important so each OS-AID project doesn’t reinvent the wheel, or repeat the same mistakes. We’re almost done with the oref-swift port. After that, we can hopefully tackle (multi-)insulin-concentration support. Until then, I’ll just keep lurking here, reading along, and admiring what you folks are building 😅 |
|
Re: your question, we have pump managers per pump driver, they share a lot of the same UI/UX, and we have the same kinds of events that you are mentioning here, i.e., suspend, resume, prime, etc., and we know when a user starts a new patch or pod for example 👍 |
Missing icons for SiteRotation
89845cb to
cbb8835
Compare
cbb8835 to
5960e06
Compare
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## dev #4248 +/- ##
============================================
- Coverage 34.38% 27.61% -6.77%
- Complexity 9500 10060 +560
============================================
Files 2411 2911 +500
Lines 125812 174614 +48802
Branches 16319 20394 +4075
============================================
+ Hits 43260 48226 +4966
- Misses 79362 123153 +43791
- Partials 3190 3235 +45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|


Tasks to do:
NSEffectiveProfileSwitch.toEffectiveProfileSwitchandNSProfileSwitch.toProfileSwitch