react-native-mytatva-rn-sdk 1.2.64 → 1.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -495,7 +495,7 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
|
|
|
495
495
|
Log.d("handleGlucoseData", "Processing glucose data: ${pocGlucose.glucoseId}")
|
|
496
496
|
|
|
497
497
|
if (pocGlucose.errorCode == enumError.NONE) {
|
|
498
|
-
|
|
498
|
+
/* if (pocGlucose.showGlucoseMG > 0) { */
|
|
499
499
|
val dto: GlucoseLog = mapToDto(pocGlucose)
|
|
500
500
|
val logs: ArrayList<GlucoseLog> = ArrayList()
|
|
501
501
|
logs.add(dto)
|
|
@@ -522,12 +522,13 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
|
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
)
|
|
525
|
-
|
|
525
|
+
/* } */
|
|
526
|
+
/* else {
|
|
526
527
|
Log.d(
|
|
527
528
|
"handleGlucoseData",
|
|
528
529
|
"Glucose value is 0 or negative: ${pocGlucose.showGlucoseMG}"
|
|
529
530
|
)
|
|
530
|
-
}
|
|
531
|
+
} */
|
|
531
532
|
} else {
|
|
532
533
|
Log.d("handleGlucoseData", "Glucose data has error: ${pocGlucose.errorCode}")
|
|
533
534
|
handleGlucoseError(pocGlucose, envType)
|
|
@@ -752,7 +753,7 @@ class CgmTrackyLibModule(reactContext: ReactApplicationContext) :
|
|
|
752
753
|
|
|
753
754
|
for ((index, batch) in chunks.withIndex()) {
|
|
754
755
|
try {
|
|
755
|
-
val transformedLogs = batch.
|
|
756
|
+
val transformedLogs = batch.map { pocGlucose ->
|
|
756
757
|
CgmLog(
|
|
757
758
|
timeInMillis = pocGlucose.timeInMillis,
|
|
758
759
|
countdownMinutes = pocGlucose.countdownMinutes,
|
|
@@ -399,7 +399,7 @@
|
|
|
399
399
|
//Is the algorithm used by the transmitter to process a single glucose data point also responsible for saving it?
|
|
400
400
|
- (void)handleCommonCT3GlucoseDataWithReceiveData:(ReceiveData *)receiveData {
|
|
401
401
|
int glucoseId = receiveData.glucoseId.intValue;
|
|
402
|
-
if (glucoseId >= self.eDevice.initNumber - 1) {
|
|
402
|
+
// if (glucoseId >= self.eDevice.initNumber - 1) {
|
|
403
403
|
// CT3 id == 19 时就出值
|
|
404
404
|
self.dataType = ReceiveDataAfterSetUserReference;
|
|
405
405
|
self.resendType = ResendDataAfterSetUserBG;
|
|
@@ -420,19 +420,19 @@
|
|
|
420
420
|
// 用来存取下一个血糖点需要调用校准算法,后续血糖点则正常调用非校准传参算法
|
|
421
421
|
currentDevice.userBG = nil;
|
|
422
422
|
}
|
|
423
|
-
} else {
|
|
424
|
-
self.dataType = ReceiveDataBeforeSetUserReference;
|
|
425
|
-
self.resendType = ResendDataBeforeSetUserBG;
|
|
426
|
-
|
|
427
|
-
//初始化期间接收到的数据存数据库的ReceiveData表中,不做处理
|
|
428
|
-
//The data received during initialization is stored in the ReceiveData table in the database without any processing.
|
|
429
|
-
[[KLTDatabaseHandler shared] updatePOCAlgoBeforeRef:receiveData];
|
|
430
|
-
KLTLog(@"计算receive.gluADC = %@, receive.error = %@", receiveData.gluADC, receiveData.error);
|
|
431
|
-
if (!self.isInResend) {
|
|
432
|
-
// 初始化期间收到异常电流数据提醒 (判断18分钟开始才会提醒"Sensor signal error")
|
|
433
|
-
[Notification_Center postNotificationName:KLTAlertCurrentInInitialNotify object:receiveData];
|
|
434
|
-
}
|
|
435
|
-
}
|
|
423
|
+
// } else {
|
|
424
|
+
// self.dataType = ReceiveDataBeforeSetUserReference;
|
|
425
|
+
// self.resendType = ResendDataBeforeSetUserBG;
|
|
426
|
+
//
|
|
427
|
+
// //初始化期间接收到的数据存数据库的ReceiveData表中,不做处理
|
|
428
|
+
// //The data received during initialization is stored in the ReceiveData table in the database without any processing.
|
|
429
|
+
// [[KLTDatabaseHandler shared] updatePOCAlgoBeforeRef:receiveData];
|
|
430
|
+
// KLTLog(@"计算receive.gluADC = %@, receive.error = %@", receiveData.gluADC, receiveData.error);
|
|
431
|
+
// if (!self.isInResend) {
|
|
432
|
+
// // 初始化期间收到异常电流数据提醒 (判断18分钟开始才会提醒"Sensor signal error")
|
|
433
|
+
// [Notification_Center postNotificationName:KLTAlertCurrentInInitialNotify object:receiveData];
|
|
434
|
+
// }
|
|
435
|
+
// }
|
|
436
436
|
|
|
437
437
|
receiveData.dataType = @(self.dataType);
|
|
438
438
|
[[KLTDatabaseHandler shared].appDelegate saveContext];
|
|
@@ -829,4 +829,4 @@
|
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
|
|
832
|
-
@end
|
|
832
|
+
@end
|
|
@@ -419,18 +419,10 @@ class FinalViewModel: NSObject {
|
|
|
419
419
|
|
|
420
420
|
let batch = batches[index]
|
|
421
421
|
|
|
422
|
-
// Filter out data where gluADC is 0
|
|
423
|
-
// let filteredBatch = batch.filter {
|
|
424
|
-
// if let gluADC = $0.gluADC as? Int {
|
|
425
|
-
// return gluADC != 0
|
|
426
|
-
// }
|
|
427
|
-
// return false
|
|
428
|
-
// }
|
|
429
|
-
|
|
430
422
|
let filteredBatch = batch.filter {
|
|
431
423
|
let gluADCValue = ($0.gluADC as? Int) ?? 0
|
|
432
424
|
let isDeleteValue = ($0.isDelete as? Int) ?? 0
|
|
433
|
-
return
|
|
425
|
+
return isDeleteValue == 0 //&& gluADCValue != 0
|
|
434
426
|
}
|
|
435
427
|
|
|
436
428
|
|