diff --git a/app/src/main/java/com/example/hpostesting/data/constant/TestStatus.kt b/app/src/main/java/com/example/hpostesting/data/constant/TestStatus.kt index 6c9a129..f40e4ac 100644 --- a/app/src/main/java/com/example/hpostesting/data/constant/TestStatus.kt +++ b/app/src/main/java/com/example/hpostesting/data/constant/TestStatus.kt @@ -10,7 +10,7 @@ enum class TestStatus(val code: Double) { FIRST_EMPTY_AIR_READING_PRINT_COMPLETED(4.4), EPROM_ADC_RETRIEVAL_STARTED(4.5), EPROM_ADC_RETRIEVAL_COMPLETED(4.6), - BUFFER_STARTED(4.0), + BUFFER_STARTED(4.7), BUFFER_COMPLETED(5.0), BUFFER_PRINT_STARTED(6.0), BUFFER_PRINT_COMPLETED(7.0), diff --git a/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt b/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt index 460f26c..54d6b98 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt @@ -501,6 +501,7 @@ class HemoCubeFragment : Fragment() { resultData.contains("REND") && this.testStatusCode < TestStatus.SAMPLE_PRINT_COMPLETED.code -> { handleSampleCompleted() + handleSampleCompleted() } currentResultData.contains("REND") @@ -599,6 +600,7 @@ class HemoCubeFragment : Fragment() { fun finishReading() { repeatReadingCount += 1 + isTestOngoing = false if (readingsPerSample == 1) { activity?.runOnUiThread { @@ -699,10 +701,10 @@ class HemoCubeFragment : Fragment() { if (!hardwareId.isNullOrBlank()) { updateDeviceId(hardwareId) - activity?.runOnUiThread { - binding.btnPlacebuffer.visibility = View.VISIBLE - } - hemoCubeViewModel.messages.postValue(getString(R.string.start)) +// activity?.runOnUiThread { +// binding.btnPlacebuffer.visibility = View.VISIBLE +// } +// hemoCubeViewModel.messages.postValue(getString(R.string.start)) } else { hemoCubeViewModel.messages.postValue("Config error") } @@ -719,10 +721,10 @@ class HemoCubeFragment : Fragment() { fun assignDefaultDevice(configData: String) { deviceHardwareId = "HCV-000-3001" testStatusCode = TestStatus.CONFIG_COMPLETED.code - activity?.runOnUiThread { - binding.btnPlacebuffer.visibility = View.VISIBLE - } - hemoCubeViewModel.messages.postValue(getString(R.string.start)) +// activity?.runOnUiThread { +// binding.btnPlacebuffer.visibility = View.VISIBLE +// } +// hemoCubeViewModel.messages.postValue(getString(R.string.start)) } fun extractV2HardwareId(input: String): String? {