public static List<PointValue> getTrendDataPointsOld(boolean doMgdl, long start_time, long end_time) { // TODO needs to cut off if would exceed the current graph scope final float conversion_factor_mmol = (float) (doMgdl ? 1 : Constants.MGDL_TO_MMOLL); final LibreBlock libreBlock= LibreBlock.getLatestForTrend(start_time, end_time ); if (libreBlock != null) { final ArrayList<Float> bg_data = getLatestBg(libreBlock); if (bg_data != null) { final ArrayList<PointValue> points = new ArrayList<>(bg_data.size()); long time_offset = 0; for (Float bg : bg_data) { points.add(new PointValue((float) ((libreBlock.timestamp - time_offset) / FUZZER), bg * conversion_factor_mmol)); time_offset += Constants.MINUTE_IN_MS; } return points; } } return null; }
public static List<PointValue> getTrendDataPointsOld(boolean doMgdl, long start_time, long end_time) { // TODO needs to cut off if would exceed the current graph scope final float conversion_factor_mmol = (float) (doMgdl ? 1 : Constants.MGDL_TO_MMOLL); final LibreBlock libreBlock= LibreBlock.getLatestForTrend(start_time, end_time ); if (libreBlock != null) { final ArrayList<Float> bg_data = getLatestBg(libreBlock); if (bg_data != null) { final ArrayList<PointValue> points = new ArrayList<>(bg_data.size()); long time_offset = 0; for (Float bg : bg_data) { points.add(new PointValue((float) ((libreBlock.timestamp - time_offset) / FUZZER), bg * conversion_factor_mmol)); time_offset += Constants.MINUTE_IN_MS; } return points; } } return null; }
public static LibreBlock getLatestForTrend() { return getLatestForTrend(JoH.tsl() - Constants.DAY_IN_MS, JoH.tsl() ); }
public static LibreBlock getLatestForTrend() { return getLatestForTrend(JoH.tsl() - Constants.DAY_IN_MS, JoH.tsl() ); }
public static LibreBlock getLatestForTrend() { return getLatestForTrend(JoH.tsl() - Constants.DAY_IN_MS, JoH.tsl() ); }
libreBlock = LibreBlock.getLatestForTrend();
libreBlock = LibreBlock.getLatestForTrend();
static Long timeForNextRead() { LibreBlock libreBlock = LibreBlock.getLatestForTrend(0L, JoH.tsl() + 5 * 60000); // Allow some packets from the future.
static Long timeForNextRead() { LibreBlock libreBlock = LibreBlock.getLatestForTrend(0L, JoH.tsl() + 5 * 60000); // Allow some packets from the future.
final float conversion_factor_mmol = (float) (doMgdl ? 1 : Constants.MGDL_TO_MMOLL); LibreBlock libreBlock= LibreBlock.getLatestForTrend(); if(libreBlock == null) { trendView.setText("No libre data to display");
final float conversion_factor_mmol = (float) (doMgdl ? 1 : Constants.MGDL_TO_MMOLL); LibreBlock libreBlock= LibreBlock.getLatestForTrend(); if(libreBlock == null) { trendView.setText("No libre data to display");
LibreBlock libreBlock = LibreBlock.getLatestForTrend(0L, JoH.tsl() + 5 * 60000); // Allow some packets from the future. if (libreBlock != null) { LastReportedTime = libreBlock.timestamp;
LibreBlock libreBlock = LibreBlock.getLatestForTrend(0L, JoH.tsl() + 5 * 60000); // Allow some packets from the future. if (libreBlock != null) { LastReportedTime = libreBlock.timestamp;