Oref0 sensitivity 24 hours

This commit is contained in:
AdrianLxM 2018-06-24 13:12:15 +02:00 committed by GitHub
parent a3c3c52249
commit d72cb96d2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,12 +55,7 @@ public class SensitivityOref0Plugin extends PluginBase implements SensitivityInt
public AutosensResult detectSensitivity(long fromTime, long toTime) { public AutosensResult detectSensitivity(long fromTime, long toTime) {
LongSparseArray<AutosensData> autosensDataTable = IobCobCalculatorPlugin.getPlugin().getAutosensDataTable(); LongSparseArray<AutosensData> autosensDataTable = IobCobCalculatorPlugin.getPlugin().getAutosensDataTable();
String age = SP.getString(R.string.key_age, ""); int hoursForDetection = 24;
int defaultHours = 24;
if (age.equals(MainApp.gs(R.string.key_adult))) defaultHours = 24;
if (age.equals(MainApp.gs(R.string.key_teenage))) defaultHours = 24;
if (age.equals(MainApp.gs(R.string.key_child))) defaultHours = 24;
int hoursForDetection = SP.getInt(R.string.key_openapsama_autosens_period, defaultHours);
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
Profile profile = MainApp.getConfigBuilder().getProfile(); Profile profile = MainApp.getConfigBuilder().getProfile();