some debugging output and forced getting user options
This commit is contained in:
parent
319e786988
commit
4581733cd7
3 changed files with 13 additions and 1 deletions
|
@ -95,6 +95,16 @@ public class DanaRUserOptionsActivity extends Activity {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
DanaRPump pump = DanaRPump.getInstance();
|
DanaRPump pump = DanaRPump.getInstance();
|
||||||
|
//used for debugging
|
||||||
|
log.debug("UserOptionsLoadedd:"+(System.currentTimeMillis() - pump.lastConnection)/1000+" s ago"
|
||||||
|
+"\ntimeDisplayType:"+pump.timeDisplayType
|
||||||
|
+"\nbuttonScroll:"+pump.buttonScrollOnOff
|
||||||
|
+"\ntimeDisplayType:"+pump.timeDisplayType
|
||||||
|
+"\nlcdOnTimeSec:"+pump.lcdOnTimeSec
|
||||||
|
+"\nbacklight:"+pump.backlightOnTimeSec
|
||||||
|
+"\npumpUnits:"+pump.units
|
||||||
|
+"\nlowReservoir:"+pump.lowReservoirRate);
|
||||||
|
|
||||||
|
|
||||||
if (pump.timeDisplayType != 0) {
|
if (pump.timeDisplayType != 0) {
|
||||||
timeFormat.setChecked(true);
|
timeFormat.setChecked(true);
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class DanaRS_Packet_Option_Get_User_Option extends DanaRS_Packet {
|
||||||
dataSize = 1;
|
dataSize = 1;
|
||||||
int selectableLanguage5 = byteArrayToInt(getBytes(data, dataIndex, dataSize));
|
int selectableLanguage5 = byteArrayToInt(getBytes(data, dataIndex, dataSize));
|
||||||
|
|
||||||
if (Config.logDanaMessageDetail) {
|
if (true) {
|
||||||
log.debug("timeDisplayType: " + pump.timeDisplayType);
|
log.debug("timeDisplayType: " + pump.timeDisplayType);
|
||||||
log.debug("buttonScrollOnOff: " + pump.buttonScrollOnOff);
|
log.debug("buttonScrollOnOff: " + pump.buttonScrollOnOff);
|
||||||
log.debug("beepAndAlarm: " + pump.beepAndAlarm);
|
log.debug("beepAndAlarm: " + pump.beepAndAlarm);
|
||||||
|
|
|
@ -19,6 +19,7 @@ import info.nightscout.androidaps.MainApp;
|
||||||
import info.nightscout.androidaps.R;
|
import info.nightscout.androidaps.R;
|
||||||
import info.nightscout.androidaps.data.Profile;
|
import info.nightscout.androidaps.data.Profile;
|
||||||
import info.nightscout.androidaps.data.PumpEnactResult;
|
import info.nightscout.androidaps.data.PumpEnactResult;
|
||||||
|
import info.nightscout.androidaps.plugins.PumpDanaRS.comm.DanaRS_Packet_Option_Get_User_Option;
|
||||||
import info.nightscout.androidaps.plugins.Treatments.Treatment;
|
import info.nightscout.androidaps.plugins.Treatments.Treatment;
|
||||||
import info.nightscout.androidaps.events.EventAppExit;
|
import info.nightscout.androidaps.events.EventAppExit;
|
||||||
import info.nightscout.androidaps.events.EventInitializationChanged;
|
import info.nightscout.androidaps.events.EventInitializationChanged;
|
||||||
|
@ -146,6 +147,7 @@ public class DanaRSService extends Service {
|
||||||
bleComm.sendMessage(new DanaRS_Packet_Bolus_Get_CIR_CF_Array());
|
bleComm.sendMessage(new DanaRS_Packet_Bolus_Get_CIR_CF_Array());
|
||||||
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumptime)));
|
MainApp.bus().post(new EventPumpStatusChanged(MainApp.gs(R.string.gettingpumptime)));
|
||||||
bleComm.sendMessage(new DanaRS_Packet_Option_Get_Pump_Time());
|
bleComm.sendMessage(new DanaRS_Packet_Option_Get_Pump_Time());
|
||||||
|
bleComm.sendMessage(new DanaRS_Packet_Option_Get_User_Option()); // Getting user options
|
||||||
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
long timeDiff = (danaRPump.pumpTime.getTime() - System.currentTimeMillis()) / 1000L;
|
||||||
log.debug("Pump time difference: " + timeDiff + " seconds");
|
log.debug("Pump time difference: " + timeDiff + " seconds");
|
||||||
if (Math.abs(timeDiff) > 3) {
|
if (Math.abs(timeDiff) > 3) {
|
||||||
|
|
Loading…
Reference in a new issue