-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Tzachi OpenAPS data 3 #1303
base: master
Are you sure you want to change the base?
Tzachi OpenAPS data 3 #1303
Conversation
… of the DB. Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Still need to download it when working in nightscout follower mode. Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
(It ended by sending too much data to followers.) Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
# Conflicts: # app/src/main/java/com/eveningoutpost/dexdrip/UtilityModels/BgGraphBuilder.java
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Signed-off-by: Tzachi Dar <tzachi.dar@gmail.com>
Would love the OpenAPS data on My SWR50. Is this part of the PR? |
Also... what is "ns client mode" in this context? I use NSClient currently and would love to only use one app. I'm hoping xDrip will have enough features to get rid of NSclient from my phone (it's a battery hog). |
What do you mean by NSClient? xDrip itself has a builtin NS client (Follower mode). Did you test it, already? |
@tolot27 that's the point... I don't know :) Was asking @tzachi-dar what they were talking about. NSClient is a build of AAPS I use as a client for Nightscout to visualise icicles, OpenAPS IOB + predictions, and enter Careportal treatments. Ideally I'd just like one app but xDrip doesn't have nearly the feature set. |
Why don't you use the Nightscout Follower Hardware Data source or configure Nightscout in the Sync settings if you use a different data source? You don't need a separate client for it, just xDrip+. |
Because I use xDrip to collect from my G6, and all the other fore mentioned reasons (for having a separate NS client)... Icicles, OpenAPS IOB + predictions, and entering Careportal treatments. AAPS NSClient is superior for those. But if xDrip improved its OpenAPS visuals (such as I suspect is in this PR) I could probably drop AAPS NSClient. I never said I use a different data source. |
@tzachi-dar Please can you rebase this PR on master to get the conflicts resolved? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment: Please use a consistant code format.
@@ -375,7 +378,7 @@ private void extend_line(List<PointValue> points, float x, float y) { | |||
line.setSquare(true); | |||
line.setPointRadius(1); | |||
line.setReverseYAxis(true); | |||
line.setBackgroundUnclipped(true); | |||
line.setBackgroundUnclipped(true); // acording to google, we are it's only users. It caused problems on zoom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
according
Please can you raise/link an issue if xDrip is somehow affected?
str1= {created_at: "2019-04-27T21:44:22.550Z", | ||
openaps: {enacted : {timestamp: "2019-04-27T21:16:24.885Z", recieved: true}}} | ||
|
||
function toMoments (status) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment part still needed?
} | ||
} | ||
|
||
// Looking for: lastLoopMoment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this comment part still needed?
} | ||
} | ||
return new_data; | ||
} | ||
private static boolean HandleTempBassal(JSONObject tr) throws JSONException { | ||
// Code here is trying to do what the nightscout code does for this kind of bassals. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bassals -> basals
Please turn this comment into a Java Docs function description.
|
||
|
||
// return value tells if new data was found | ||
private boolean downloadTreatments(final NightscoutService nightscoutService, final String hashedSecret, String baseURI, URI uri) throws Exception{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
downloadTreatments
and downloadDeviceStatus
share many identical code lines. Please refactor it to avoid these duplications.
//Log.e("xxxx", "basal ago " + basalAgo); | ||
if(basalAgo < 0) { | ||
// Basal stops if no basal was given. | ||
// Todo upload NS default basal profile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you add something here?
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no reason to have two empty lines here.
return ret; | ||
} | ||
|
||
public static void test() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this function to a unit test?
@tzachi-dar What is the state of this PR? Will you continue to clean it up or replace it by another PR? |
Yes, I'll do more cleaning and send it in a few weeks.
I want to finish with libre before it.
…On Wed, 28 Apr 2021 at 22:32, Mathias Walter ***@***.***> wrote:
@tzachi-dar <https://github.com/tzachi-dar> What is the state of this PR?
Will you continue to clean it up or replace it by another PR?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1303 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB4TBZASARJNBAGFOZFYADTTLBPETANCNFSM4MHXES6Q>
.
|
@tzachi-dar it's been a few months... I can take this PR and do the requested changes if you don't have the time right now. |
@tzachi-dar @marciogranzotto How can we proceed on this PR? |
I would love to see such features on xDrip. |
This PR allows xdrip to display OAPS data (basal rate, iob, cob and last connected).
Works when xdrip is uploading to NS and also in ns client mode.
Also send the data when in follower mode.
I have tested this code for a few month and it works well for me.