public static BloodTest create(long timestamp_ms, double mgdl, String source) { return create(timestamp_ms, mgdl, source, null); }
public static BloodTest create(long timestamp_ms, double mgdl, String source) { return create(timestamp_ms, mgdl, source, null); }
public static BloodTest create(long timestamp_ms, double mgdl, String source) { return create(timestamp_ms, mgdl, source, null); }
public static BloodTest createFromCal(double bg, double timeoffset, String source, String suggested_uuid) { final String unit = Pref.getString("units", "mgdl"); if (unit.compareTo("mgdl") != 0) { bg = bg * Constants.MMOLL_TO_MGDL; } if ((bg < 40) || (bg > 400)) { Log.wtf(TAG, "Invalid out of range bloodtest glucose mg/dl value of: " + bg); JoH.static_toast_long("Bloodtest out of range: " + bg + " mg/dl"); return null; } return create((long) (new Date().getTime() - timeoffset), bg, source, suggested_uuid); }
public static BloodTest createFromCal(double bg, double timeoffset, String source, String suggested_uuid) { final String unit = Pref.getString("units", "mgdl"); if (unit.compareTo("mgdl") != 0) { bg = bg * Constants.MMOLL_TO_MGDL; } if ((bg < 40) || (bg > 400)) { Log.wtf(TAG, "Invalid out of range bloodtest glucose mg/dl value of: " + bg); JoH.static_toast_long("Bloodtest out of range: " + bg + " mg/dl"); return null; } return create((long) (new Date().getTime() - timeoffset), bg, source, suggested_uuid); }
public static BloodTest createFromCal(double bg, double timeoffset, String source, String suggested_uuid) { UserError.Log.d(TAG, "createFromCal call create"); final String unit = Pref.getString("units", "mgdl"); if (unit.compareTo("mgdl") != 0) { bg = bg * Constants.MMOLL_TO_MGDL; } if ((bg < 40) || (bg > 400)) { Log.wtf(TAG, "Invalid out of range bloodtest glucose mg/dl value of: " + bg); JoH.static_toast_long("Bloodtest out of range: " + bg + " mg/dl"); return null; } return create((long) (new Date().getTime() - timeoffset), bg, source, suggested_uuid); }
if (tr.getString("units").equals("mmol")) mgdl = mgdl * Constants.MMOLL_TO_MGDL; final BloodTest bt = BloodTest.create(timestamp, mgdl, tr.getString("enteredBy") + " " + VIA_NIGHTSCOUT_TAG); if (bt != null) {
if (tr.getString("units").equals("mmol")) mgdl = mgdl * Constants.MMOLL_TO_MGDL; final BloodTest bt = BloodTest.create(timestamp, mgdl, tr.getString("enteredBy") + " " + VIA_NIGHTSCOUT_TAG); if (bt != null) {
final BloodTest bt = BloodTest.create((gtb.time - ct.timediff) + gtb.offsetMs(), gtb.mgdl, BLUETOOTH_GLUCOSE_METER_TAG + ":\n" + mLastManufacturer + " " + mLastConnectedDeviceAddress, gtb.getUuid().toString()); if (bt != null) { UserError.Log.d(TAG, "Successfully created new BloodTest: " + bt.toS());
final BloodTest bt = BloodTest.create((gtb.time - ct.timediff) + gtb.offsetMs(), gtb.mgdl, BLUETOOTH_GLUCOSE_METER_TAG + ":\n" + mLastManufacturer + " " + mLastConnectedDeviceAddress, gtb.getUuid().toString()); if (bt != null) { UserError.Log.d(TAG, "Successfully created new BloodTest: " + bt.toS());
final BloodTest bt = BloodTest.create((gtb.time) + gtb.offsetMs(), gtb.mgdl, BLUETOOTH_GLUCOSE_METER_TAG + ":\n" + mLastManufacturer + " " + mLastConnectedDeviceAddress); if (bt != null) { UserError.Log.d(TAG, "Successfully created new BloodTest: " + bt.toS());
final BloodTest bt = BloodTest.create((gtb.time) + gtb.offsetMs(), gtb.mgdl, BLUETOOTH_GLUCOSE_METER_TAG + ":\n" + mLastManufacturer + " " + mLastConnectedDeviceAddress); if (bt != null) { UserError.Log.d(TAG, "Successfully created new BloodTest: " + bt.toS());