Get profile for specific time for percentage -> absolute conversion
This commit is contained in:
parent
f9fb4c1bc5
commit
7be49571ae
|
@ -82,7 +82,7 @@ public class NSUpload {
|
|||
try {
|
||||
SharedPreferences SP = PreferenceManager.getDefaultSharedPreferences(MainApp.instance().getApplicationContext());
|
||||
boolean useAbsolute = SP.getBoolean("ns_sync_use_absolute", false);
|
||||
Profile profile = ProfileFunctions.getInstance().getProfile();
|
||||
Profile profile = ProfileFunctions.getInstance().getProfile(temporaryBasal.date);
|
||||
double absoluteRate = 0;
|
||||
if (profile != null) {
|
||||
absoluteRate = profile.getBasal(temporaryBasal.date) * temporaryBasal.percentRate / 100d;
|
||||
|
|
Loading…
Reference in a new issue