Java Code Examples for com.eveningoutpost.dexdrip.ImportedLibraries.dexcom.records.SensorRecord#getUnfiltered()
The following examples show how to use
com.eveningoutpost.dexdrip.ImportedLibraries.dexcom.records.SensorRecord#getUnfiltered() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BgReading.java From xDrip with GNU General Public License v3.0 | 6 votes |
public static void create(SensorRecord sensorRecord, long addativeOffset, Context context) { Log.i(TAG, "create: gonna make some sensor records: " + sensorRecord.getUnfiltered()); if (BgReading.is_new(sensorRecord, addativeOffset)) { BgReading bgReading = new BgReading(); Sensor sensor = Sensor.currentSensor(); Calibration calibration = Calibration.getForTimestamp(sensorRecord.getSystemTime().getTime() + addativeOffset); if (sensor != null && calibration != null) { bgReading.sensor = sensor; bgReading.sensor_uuid = sensor.uuid; bgReading.calibration = calibration; bgReading.calibration_uuid = calibration.uuid; bgReading.raw_data = (sensorRecord.getUnfiltered() / 1000); bgReading.filtered_data = (sensorRecord.getFiltered() / 1000); bgReading.timestamp = sensorRecord.getSystemTime().getTime() + addativeOffset; if (bgReading.timestamp > new Date().getTime()) { return; } bgReading.uuid = UUID.randomUUID().toString(); bgReading.time_since_sensor_started = bgReading.timestamp - sensor.started_at; bgReading.calculateAgeAdjustedRawValue(); bgReading.save(); } } }
Example 2
Source File: BgReading.java From xDrip with GNU General Public License v3.0 | 6 votes |
public static void create(SensorRecord sensorRecord, long addativeOffset, Context context) { Log.i(TAG, "create: gonna make some sensor records: " + sensorRecord.getUnfiltered()); if (BgReading.is_new(sensorRecord, addativeOffset)) { BgReading bgReading = new BgReading(); Sensor sensor = Sensor.currentSensor(); Calibration calibration = Calibration.getForTimestamp(sensorRecord.getSystemTime().getTime() + addativeOffset); if (sensor != null && calibration != null) { bgReading.sensor = sensor; bgReading.sensor_uuid = sensor.uuid; bgReading.calibration = calibration; bgReading.calibration_uuid = calibration.uuid; bgReading.raw_data = (sensorRecord.getUnfiltered() / 1000); bgReading.filtered_data = (sensorRecord.getFiltered() / 1000); bgReading.timestamp = sensorRecord.getSystemTime().getTime() + addativeOffset; if (bgReading.timestamp > new Date().getTime()) { return; } bgReading.uuid = UUID.randomUUID().toString(); bgReading.time_since_sensor_started = bgReading.timestamp - sensor.started_at; bgReading.calculateAgeAdjustedRawValue(); bgReading.save(); } } }
Example 3
Source File: BgReading.java From xDrip-plus with GNU General Public License v3.0 | 6 votes |
public static void create(SensorRecord sensorRecord, long addativeOffset, Context context) { Log.i(TAG, "create: gonna make some sensor records: " + sensorRecord.getUnfiltered()); if (BgReading.is_new(sensorRecord, addativeOffset)) { BgReading bgReading = new BgReading(); Sensor sensor = Sensor.currentSensor(); Calibration calibration = Calibration.getForTimestamp(sensorRecord.getSystemTime().getTime() + addativeOffset); if (sensor != null && calibration != null) { bgReading.sensor = sensor; bgReading.sensor_uuid = sensor.uuid; bgReading.calibration = calibration; bgReading.calibration_uuid = calibration.uuid; bgReading.raw_data = (sensorRecord.getUnfiltered() / 1000); bgReading.filtered_data = (sensorRecord.getFiltered() / 1000); bgReading.timestamp = sensorRecord.getSystemTime().getTime() + addativeOffset; if (bgReading.timestamp > new Date().getTime()) { return; } bgReading.uuid = UUID.randomUUID().toString(); bgReading.time_since_sensor_started = bgReading.timestamp - sensor.started_at; bgReading.calculateAgeAdjustedRawValue(); bgReading.save(); } } }
Example 4
Source File: BgReading.java From xDrip-plus with GNU General Public License v3.0 | 6 votes |
public static void create(SensorRecord sensorRecord, long addativeOffset, Context context) { Log.i(TAG, "create: gonna make some sensor records: " + sensorRecord.getUnfiltered()); if (BgReading.is_new(sensorRecord, addativeOffset)) { BgReading bgReading = new BgReading(); Sensor sensor = Sensor.currentSensor(); Calibration calibration = Calibration.getForTimestamp(sensorRecord.getSystemTime().getTime() + addativeOffset); if (sensor != null && calibration != null) { bgReading.sensor = sensor; bgReading.sensor_uuid = sensor.uuid; bgReading.calibration = calibration; bgReading.calibration_uuid = calibration.uuid; bgReading.raw_data = (sensorRecord.getUnfiltered() / 1000); bgReading.filtered_data = (sensorRecord.getFiltered() / 1000); bgReading.timestamp = sensorRecord.getSystemTime().getTime() + addativeOffset; if (bgReading.timestamp > new Date().getTime()) { return; } bgReading.uuid = UUID.randomUUID().toString(); bgReading.time_since_sensor_started = bgReading.timestamp - sensor.started_at; bgReading.calculateAgeAdjustedRawValue(); bgReading.save(); } } }
Example 5
Source File: BgReading.java From xDrip-Experimental with GNU General Public License v3.0 | 6 votes |
public static void create(SensorRecord sensorRecord, long addativeOffset, Context context) { Log.i(TAG, "create: gonna make some sensor records: " + sensorRecord.getUnfiltered()); if(BgReading.is_new(sensorRecord, addativeOffset)) { BgReading bgReading = new BgReading(); Sensor sensor = Sensor.currentSensor(); Calibration calibration = Calibration.getForTimestamp(sensorRecord.getSystemTime().getTime() + addativeOffset); if(sensor != null && calibration != null) { bgReading.sensor = sensor; bgReading.sensor_uuid = sensor.uuid; bgReading.calibration = calibration; bgReading.calibration_uuid = calibration.uuid; bgReading.raw_data = (sensorRecord.getUnfiltered() / 1000); bgReading.filtered_data = (sensorRecord.getFiltered() / 1000); bgReading.timestamp = sensorRecord.getSystemTime().getTime() + addativeOffset; if(bgReading.timestamp > new Date().getTime()) { return; } bgReading.uuid = UUID.randomUUID().toString(); bgReading.time_since_sensor_started = bgReading.timestamp - sensor.started_at; bgReading.calculateAgeAdjustedRawValue(context); bgReading.save(); } } }
Example 6
Source File: BgReading.java From xDrip with GNU General Public License v3.0 | 6 votes |
public static void create(SensorRecord sensorRecord, long addativeOffset, Context context) { Log.w(TAG, "gonna make some sensor records: " + sensorRecord.getUnfiltered()); if(BgReading.is_new(sensorRecord, addativeOffset)) { BgReading bgReading = new BgReading(); Sensor sensor = Sensor.currentSensor(); Calibration calibration = Calibration.getForTimestamp(sensorRecord.getSystemTime().getTime() + addativeOffset); if(sensor != null && calibration != null) { bgReading.sensor = sensor; bgReading.sensor_uuid = sensor.uuid; bgReading.calibration = calibration; bgReading.calibration_uuid = calibration.uuid; bgReading.raw_data = (sensorRecord.getUnfiltered() / 1000); bgReading.filtered_data = (sensorRecord.getFiltered() / 1000); bgReading.timestamp = sensorRecord.getSystemTime().getTime() + addativeOffset; if(bgReading.timestamp > new Date().getTime()) { return; } bgReading.uuid = UUID.randomUUID().toString(); bgReading.time_since_sensor_started = bgReading.timestamp - sensor.started_at; bgReading.synced = false; bgReading.calculateAgeAdjustedRawValue(); bgReading.save(); } } }