From f4085545eafefcd57834973945cade260a774fe4 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Mon, 30 Oct 2023 23:25:45 +0530 Subject: [PATCH] use calculated ratio for class and save coeffs --- .../presentation/buffercheck/HemoCubeBufferCheckFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt b/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt index a7a9337..deb77e1 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/buffercheck/HemoCubeBufferCheckFragment.kt @@ -226,7 +226,7 @@ class HemoCubeBufferCheckFragment : Fragment() { val led2Average = log10(led2BufferForDevice?.div(led2Sample!!) ?: 0.0) val deviceRatio = led1Average / led2Average val calculateRatio = calculateRatio(deviceRatio) - val classificationResult = findResult(deviceRatio) + val classificationResult = findResult(calculateRatio) messages.postValue(classificationResult) val bufferData = BufferCheckData( deviceId= deviceId, @@ -239,6 +239,7 @@ class HemoCubeBufferCheckFragment : Fragment() { led2Sample = led2Sample, deviceRatio = deviceRatio, calculatedRatio = calculateRatio, + coefficients = currentDeviceData?.coefficients?.get(0).toString() + ", " + currentDeviceData?.coefficients?.get(1).toString(), classificationResult = classificationResult, deviceSerialNumber = sharedPreferences.getString(Constants.USER_ID, "").toString(), testTime = SimpleDateFormat(