private static void reReadGlucoseData() { enqueueUniqueCommand(new GlucoseTxMessage(), "Re-read glucose"); }
private static void reReadGlucoseData() { enqueueUniqueCommand(new GlucoseTxMessage(), "Re-read glucose"); }
private static void reReadGlucoseData() { enqueueUniqueCommand(new GlucoseTxMessage(), "Re-read glucose"); }
public static void restartSensorWithTimeTravel(long when) { if (acceptCommands()) { enqueueUniqueCommand( new SessionStopTxMessage( DexTimeKeeper.getDexTime(getTransmitterID(), when)), "Auto Stop Sensor"); final long when_started = when + SECOND_IN_MS; enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when_started)), "Auto Start Sensor"); } }
public static void restartSensorWithTimeTravel(long when) { if (acceptCommands()) { enqueueUniqueCommand( new SessionStopTxMessage( DexTimeKeeper.getDexTime(getTransmitterID(), when)), "Auto Stop Sensor"); final long when_started = when + SECOND_IN_MS; enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when_started)), "Auto Start Sensor"); } }
public static void restartSensorWithTimeTravel(long when) { if (acceptCommands()) { enqueueUniqueCommand( new SessionStopTxMessage( DexTimeKeeper.getDexTime(getTransmitterID(), when)), "Auto Stop Sensor"); final long when_started = when + SECOND_IN_MS; enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when_started)), "Auto Start Sensor"); } }
private static void glucoseRxCommon(final BaseGlucoseRxMessage glucose, final Ob1G5CollectionService parent, final RxBleConnection connection) { if (JoH.ratelimit("ob1-g5-also-read-raw", 20)) { enqueueUniqueCommand(new SensorTxMessage(), "Also read raw"); } if (JoH.pratelimit("g5-tx-time-since", 7200) || glucose.calibrationState().warmingUp() || !DexSessionKeeper.isStarted()) { if (JoH.ratelimit("g5-tx-time-governer", 30)) { enqueueUniqueCommand(new TimeTxMessage(), "Periodic Query Time"); } } // TODO check firmware version if (glucose.calibrationState().readyForBackfill() && !parent.getBatteryStatusNow) { backFillIfNeeded(parent, connection); } processGlucoseRxMessage(parent, glucose); parent.updateLast(JoH.tsl()); parent.clearErrors(); }
private static void glucoseRxCommon(final BaseGlucoseRxMessage glucose, final Ob1G5CollectionService parent, final RxBleConnection connection) { if (JoH.ratelimit("ob1-g5-also-read-raw", 20)) { enqueueUniqueCommand(new SensorTxMessage(), "Also read raw"); } if (JoH.pratelimit("g5-tx-time-since", 7200) || glucose.calibrationState().warmingUp() || !DexSessionKeeper.isStarted()) { if (JoH.ratelimit("g5-tx-time-governer", 30)) { enqueueUniqueCommand(new TimeTxMessage(), "Periodic Query Time"); } } // TODO check firmware version if (glucose.calibrationState().readyForBackfill() && !parent.getBatteryStatusNow) { backFillIfNeeded(parent, connection); } processGlucoseRxMessage(parent, glucose); parent.updateLast(JoH.tsl()); parent.clearErrors(); }
private static void glucoseRxCommon(final BaseGlucoseRxMessage glucose, final Ob1G5CollectionService parent, final RxBleConnection connection) { if (JoH.ratelimit("ob1-g5-also-read-raw", 20)) { enqueueUniqueCommand(new SensorTxMessage(), "Also read raw"); } if (JoH.pratelimit("g5-tx-time-since", 7200) || glucose.calibrationState().warmingUp() || !DexSessionKeeper.isStarted()) { if (JoH.ratelimit("g5-tx-time-governer", 30)) { enqueueUniqueCommand(new TimeTxMessage(), "Periodic Query Time"); } } // TODO check firmware version if (glucose.calibrationState().readyForBackfill() && !parent.getBatteryStatusNow) { backFillIfNeeded(parent, connection); } processGlucoseRxMessage(parent, glucose); parent.updateLast(JoH.tsl()); parent.clearErrors(); }
public static void startSensor(long when) { if (acceptCommands()) { if (msSince(when) > MAX_START_TIME_REWIND) { when = JoH.tsl() - MAX_START_TIME_REWIND; UserError.Log.e(TAG, "Cannot rewind sensor start time beyond: " + JoH.dateTimeText(when)); } if (usingG6()) { final String code = G6CalibrationParameters.getCurrentSensorCode(); if (code == null) { UserError.Log.wtf(TAG, "Cannot start G6 sensor as calibration code not set!"); } else { UserError.Log.ueh(TAG, "Starting G6 sensor using calibration code: " + code); enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when), code), "Start G6 Sensor"); } } else { UserError.Log.ueh(TAG, "Starting G5 sensor"); enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when)), "Start G5 Sensor"); } } }
public static void startSensor(long when) { if (acceptCommands()) { if (msSince(when) > MAX_START_TIME_REWIND) { when = JoH.tsl() - MAX_START_TIME_REWIND; UserError.Log.e(TAG, "Cannot rewind sensor start time beyond: " + JoH.dateTimeText(when)); } if (usingG6()) { final String code = G6CalibrationParameters.getCurrentSensorCode(); if (code == null) { UserError.Log.wtf(TAG, "Cannot start G6 sensor as calibration code not set!"); } else { UserError.Log.ueh(TAG, "Starting G6 sensor using calibration code: " + code); enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when), code), "Start G6 Sensor"); } } else { UserError.Log.ueh(TAG, "Starting G5 sensor"); enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when)), "Start G5 Sensor"); } } }
public static void startSensor(long when) { if (acceptCommands()) { if (msSince(when) > MAX_START_TIME_REWIND) { when = JoH.tsl() - MAX_START_TIME_REWIND; UserError.Log.e(TAG, "Cannot rewind sensor start time beyond: " + JoH.dateTimeText(when)); } if (usingG6()) { final String code = G6CalibrationParameters.getCurrentSensorCode(); if (code == null) { UserError.Log.wtf(TAG, "Cannot start G6 sensor as calibration code not set!"); } else { UserError.Log.ueh(TAG, "Starting G6 sensor using calibration code: " + code); enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when), code), "Start G6 Sensor"); } } else { UserError.Log.ueh(TAG, "Starting G5 sensor"); enqueueUniqueCommand(new SessionStartTxMessage(when, DexTimeKeeper.getDexTime(getTransmitterID(), when)), "Start G5 Sensor"); } } }
final long endTime = latest_timestamp + (Constants.MINUTE_IN_MS * 5); UserError.Log.d(TAG, "Requesting backfill between: " + JoH.dateTimeText(startTime) + " " + JoH.dateTimeText(endTime)); enqueueUniqueCommand( BackFillTxMessage.get(getTransmitterID(), startTime, endTime), "Get backfill since: " + JoH.hourMinuteString(startTime));
final long endTime = latest_timestamp + (Constants.MINUTE_IN_MS * 5); UserError.Log.d(TAG, "Requesting backfill between: " + JoH.dateTimeText(startTime) + " " + JoH.dateTimeText(endTime)); enqueueUniqueCommand( BackFillTxMessage.get(getTransmitterID(), startTime, endTime), "Get backfill since: " + JoH.hourMinuteString(startTime));
final long endTime = latest_timestamp + (Constants.MINUTE_IN_MS * 5); UserError.Log.d(TAG, "Requesting backfill between: " + JoH.dateTimeText(startTime) + " " + JoH.dateTimeText(endTime)); enqueueUniqueCommand( BackFillTxMessage.get(getTransmitterID(), startTime, endTime), "Get backfill since: " + JoH.hourMinuteString(startTime));
enqueueUniqueCommand(new BatteryInfoTxMessage(), "Query battery"); parent.getBatteryStatusNow = false; UserError.Log.ueh(TAG, msg); reReadGlucoseData(); enqueueUniqueCommand(new TimeTxMessage(), "Query time after stop"); } else {
enqueueUniqueCommand(new BatteryInfoTxMessage(), "Query battery"); parent.getBatteryStatusNow = false; UserError.Log.ueh(TAG, msg); reReadGlucoseData(); enqueueUniqueCommand(new TimeTxMessage(), "Query time after stop"); } else {
enqueueUniqueCommand(new BatteryInfoTxMessage(), "Query battery"); parent.getBatteryStatusNow = false; UserError.Log.ueh(TAG, msg); reReadGlucoseData(); enqueueUniqueCommand(new TimeTxMessage(), "Query time after stop"); } else {