Some minor tweaks.

This commit is contained in:
Johannes Mockenhaupt 2017-11-20 23:53:39 +01:00
parent 3cccf287da
commit 971a97a9e3
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
3 changed files with 10 additions and 3 deletions

View file

@ -76,7 +76,7 @@ public class ComboFragment extends SubscriberFragment implements View.OnClickLis
public boolean onLongClick(View view) { public boolean onLongClick(View view) {
switch (view.getId()) { switch (view.getId()) {
case R.id.combo_refresh: case R.id.combo_refresh:
new Thread(() -> ComboPlugin.getPlugin().forceFullHistoryRead()).start(); new Thread(() -> ComboPlugin.getPlugin().readAllPumpData()).start();
return true; return true;
} }
return false; return false;

View file

@ -274,7 +274,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
return; return;
} }
// ensure time and date(!) are current // ensure time and date(!) are current; connect triggers a notification on mismatch
/* menu not supported by ruffy /* menu not supported by ruffy
if (!pump.initialized) { if (!pump.initialized) {
if (!runCommand("Updating pump clock", 2, ruffyScripter::setDateAndTime).success) { if (!runCommand("Updating pump clock", 2, ruffyScripter::setDateAndTime).success) {
@ -958,7 +958,7 @@ public class ComboPlugin implements PluginBase, PumpInterface, ConstraintsInterf
} }
} }
void forceFullHistoryRead() { void readAllPumpData() {
readHistory(new PumpHistoryRequest() readHistory(new PumpHistoryRequest()
.bolusHistory(PumpHistoryRequest.FULL) .bolusHistory(PumpHistoryRequest.FULL)
.tbrHistory(PumpHistoryRequest.FULL) .tbrHistory(PumpHistoryRequest.FULL)

View file

@ -27,4 +27,11 @@ public class BasalProfile {
public int hashCode() { public int hashCode() {
return Arrays.hashCode(hourlyRates); return Arrays.hashCode(hourlyRates);
} }
@Override
public String toString() {
return "BasalProfile{" +
"hourlyRates=" + Arrays.toString(hourlyRates) +
'}';
}
} }