public static InitialDataQuality getInitialDataQuality() { // get uncalculated data JoH.clearCache(); final List<BgReading> uncalculated = BgReading.latestUnCalculated(3); return getInitialDataQuality(uncalculated); }
public static InitialDataQuality getInitialDataQuality() { // get uncalculated data JoH.clearCache(); final List<BgReading> uncalculated = BgReading.latestUnCalculated(3); return getInitialDataQuality(uncalculated); }
public static InitialDataQuality getInitialDataQuality() { // get uncalculated data JoH.clearCache(); final List<BgReading> uncalculated = BgReading.latestUnCalculated(3); return getInitialDataQuality(uncalculated); }
public static void fullDatabaseReset() { try { clearCache(); ActiveAndroid.dispose(); ActiveAndroid.initialize(xdrip.getAppContext()); } catch (Exception e) { Log.e(TAG,"Error restarting active android db"); } }
public static void fullDatabaseReset() { try { clearCache(); ActiveAndroid.dispose(); ActiveAndroid.initialize(xdrip.getAppContext()); } catch (Exception e) { Log.e(TAG,"Error restarting active android db"); } }
public static synchronized void invalidateAllForSensor() { final List<Calibration> cals = allForSensorLimited(9999999); if (cals != null) { for (Calibration cal : cals) { cal.invalidate(); } } JoH.clearCache(); String msg = "Deleted all calibrations for sensor"; Log.ueh(TAG, msg); JoH.static_toast_long(msg); }
public static synchronized void invalidateAllForSensor() { final List<Calibration> cals = allForSensorLimited(9999999); if (cals != null) { for (Calibration cal : cals) { cal.invalidate(); } } JoH.clearCache(); String msg = "Deleted all calibrations for sensor"; Log.ueh(TAG, msg); JoH.static_toast_long(msg); }
void find_new_raw_curve() { JoH.clearCache(); final List<BgReading> last_3 = BgReading.latest(3); if ((last_3 != null) && (last_3.size() == 3)) {
public void find_new_curve() { JoH.clearCache(); List<BgReading> last_3 = BgReading.latest(3); if ((last_3 != null) && (last_3.size() == 3)) {
public void find_new_curve() { JoH.clearCache(); List<BgReading> last_3 = BgReading.latest(3); if ((last_3 != null) && (last_3.size() == 3)) {
public void find_new_curve() { JoH.clearCache(); List<BgReading> last_3 = BgReading.latest(3); if ((last_3 != null) && (last_3.size() == 3)) {
void find_new_raw_curve() { JoH.clearCache(); final List<BgReading> last_3 = BgReading.latest(3); if ((last_3 != null) && (last_3.size() == 3)) {
public synchronized static void stopSensor() { final Sensor sensor = currentSensor(); if (sensor == null) { return; } sensor.stopped_at = JoH.tsl(); UserError.Log.ueh("SENSOR", "Sensor stopped at " + JoH.dateTimeText(sensor.stopped_at)); sensor.save(); if (currentSensor() != null) { UserError.Log.wtf(TAG, "Failed to update sensor stop in database"); } SensorSendQueue.addToQueue(sensor); JoH.clearCache(); }
public synchronized static void stopSensor() { final Sensor sensor = currentSensor(); if (sensor == null) { return; } sensor.stopped_at = JoH.tsl(); UserError.Log.ueh("SENSOR", "Sensor stopped at " + JoH.dateTimeText(sensor.stopped_at)); sensor.save(); if (currentSensor() != null) { UserError.Log.wtf(TAG, "Failed to update sensor stop in database"); } SensorSendQueue.addToQueue(sensor); JoH.clearCache(); }
public void performAll() { migrateBGAlerts(); migrateToNewStyleRestUris(); BgReading.updateDB(); LibreBlock.updateDB(); LibreData.updateDB(); APStatus.updateDB(); Prediction.updateDB(); DesertSync.updateDB(); JoH.clearCache(); IncompatibleApps.notifyAboutIncompatibleApps(); CompatibleApps.notifyAboutCompatibleApps(); }
public void performAll() { migrateBGAlerts(); migrateToNewStyleRestUris(); BgReading.updateDB(); LibreBlock.updateDB(); LibreData.updateDB(); APStatus.updateDB(); Prediction.updateDB(); DesertSync.updateDB(); JoH.clearCache(); IncompatibleApps.notifyAboutIncompatibleApps(); CompatibleApps.notifyAboutCompatibleApps(); }
public synchronized static void stop() { Sensor.stopSensor(); Inevitable.task("stop-sensor",1000, Sensor::stopSensor); AlertPlayer.getPlayer().stopAlert(xdrip.getAppContext(), true, false); JoH.static_toast_long("Sensor stopped"); JoH.clearCache(); LibreAlarmReceiver.clearSensorStats(); PluggableCalibration.invalidateAllCaches(); Ob1G5StateMachine.stopSensor(); CollectionServiceStarter.restartCollectionServiceBackground(); Home.staticRefreshBGCharts(); }
public synchronized static void stop() { Sensor.stopSensor(); Inevitable.task("stop-sensor",1000, Sensor::stopSensor); AlertPlayer.getPlayer().stopAlert(xdrip.getAppContext(), true, false); JoH.static_toast_long("Sensor stopped"); JoH.clearCache(); LibreAlarmReceiver.clearSensorStats(); PluggableCalibration.invalidateAllCaches(); Ob1G5StateMachine.stopSensor(); CollectionServiceStarter.restartCollectionServiceBackground(); Home.staticRefreshBGCharts(); }
public static void startSensorForTime(long startTime) { Sensor.create(startTime); UserError.Log.ueh("NEW SENSOR", "Sensor started at " + JoH.dateTimeText(startTime)); JoH.static_toast_long(gs(R.string.new_sensor_started)); startWatchUpdaterService(xdrip.getAppContext(), WatchUpdaterService.ACTION_SYNC_SENSOR, TAG); LibreAlarmReceiver.clearSensorStats(); // TODO this is just a timer and could be confusing - consider removing this notification // JoH.scheduleNotification(xdrip.getAppContext(), "Sensor should be ready", xdrip.getAppContext().getString(R.string.please_enter_two_calibrations_to_get_started), 60 * 130, Home.SENSOR_READY_ID); // reverse libre hacky workaround Treatments.SensorStart((DexCollectionType.hasLibre() ? startTime + (3600000) : startTime)); CollectionServiceStarter.restartCollectionServiceBackground(); Ob1G5StateMachine.startSensor(startTime); JoH.clearCache(); Home.staticRefreshBGCharts(); }
public static void startSensorForTime(long startTime) { Sensor.create(startTime); UserError.Log.ueh("NEW SENSOR", "Sensor started at " + JoH.dateTimeText(startTime)); JoH.static_toast_long(gs(R.string.new_sensor_started)); startWatchUpdaterService(xdrip.getAppContext(), WatchUpdaterService.ACTION_SYNC_SENSOR, TAG); LibreAlarmReceiver.clearSensorStats(); // TODO this is just a timer and could be confusing - consider removing this notification // JoH.scheduleNotification(xdrip.getAppContext(), "Sensor should be ready", xdrip.getAppContext().getString(R.string.please_enter_two_calibrations_to_get_started), 60 * 130, Home.SENSOR_READY_ID); // reverse libre hacky workaround Treatments.SensorStart((DexCollectionType.hasLibre() ? startTime + (3600000) : startTime)); CollectionServiceStarter.restartCollectionServiceBackground(); Ob1G5StateMachine.startSensor(startTime); JoH.clearCache(); Home.staticRefreshBGCharts(); }