set defaults for display range
This commit is contained in:
parent
d7200d1e8e
commit
955ecc6d64
|
@ -940,8 +940,16 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final double lowLine = SP.getDouble("low_mark", Profile.fromMgdlToUnits(OverviewPlugin.bgTargetLow, units));
|
double lowLineSetting = SP.getDouble("low_mark", Profile.fromMgdlToUnits(OverviewPlugin.bgTargetLow, units));
|
||||||
final double highLine = SP.getDouble("high_mark", Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units));
|
double highLineSetting = SP.getDouble("high_mark", Profile.fromMgdlToUnits(OverviewPlugin.bgTargetHigh, units));
|
||||||
|
|
||||||
|
if (lowLineSetting < 1)
|
||||||
|
lowLineSetting = Profile.fromMgdlToUnits(76d, units);
|
||||||
|
if (highLineSetting < 1)
|
||||||
|
highLineSetting = Profile.fromMgdlToUnits(180d, units);
|
||||||
|
|
||||||
|
final double lowLine = lowLineSetting;
|
||||||
|
final double highLine = highLineSetting;
|
||||||
|
|
||||||
//Start with updating the BG as it is unaffected by loop.
|
//Start with updating the BG as it is unaffected by loop.
|
||||||
// **** BG value ****
|
// **** BG value ****
|
||||||
|
|
|
@ -149,12 +149,13 @@ public class BGSourceFragment extends SubscriberFragment {
|
||||||
builder.setMessage(MainApp.sResources.getString(R.string.removerecord) + "\n" + DateUtil.dateAndTimeString(bgReading.date) + "\n" + bgReading.valueToUnitsToString(profile.getUnits()));
|
builder.setMessage(MainApp.sResources.getString(R.string.removerecord) + "\n" + DateUtil.dateAndTimeString(bgReading.date) + "\n" + bgReading.valueToUnitsToString(profile.getUnits()));
|
||||||
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), new DialogInterface.OnClickListener() {
|
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
final String _id = bgReading._id;
|
/* final String _id = bgReading._id;
|
||||||
if (NSUpload.isIdValid(_id)) {
|
if (NSUpload.isIdValid(_id)) {
|
||||||
NSUpload.removeFoodFromNS(_id);
|
NSUpload.removeFoodFromNS(_id);
|
||||||
} else {
|
} else {
|
||||||
UploadQueue.removeID("dbAdd", _id);
|
UploadQueue.removeID("dbAdd", _id);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
bgReading.isValid = false;
|
bgReading.isValid = false;
|
||||||
MainApp.getDbHelper().update(bgReading);
|
MainApp.getDbHelper().update(bgReading);
|
||||||
updateGUI();
|
updateGUI();
|
||||||
|
|
Loading…
Reference in a new issue