diff --git a/app/src/main/java/com/example/hpostesting/data/constant/Constants.kt b/app/src/main/java/com/example/hpostesting/data/constant/Constants.kt index 33aff22..3183d9e 100644 --- a/app/src/main/java/com/example/hpostesting/data/constant/Constants.kt +++ b/app/src/main/java/com/example/hpostesting/data/constant/Constants.kt @@ -75,6 +75,6 @@ object Constants { const val BUFFER_VALUE_4 = "BufferValue4" const val DEVICE_ID = "DEVICE_ID" - const val BUFFER_LED_LOWER_BOUND = 20000 - const val BUFFER_LED_HIGHER_BOUND = 24000 + const val BUFFER_LED_LOWER_BOUND = 21000 + const val BUFFER_LED_UPPER_BOUND = 24500 } \ No newline at end of file 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 735fcc6..3b7124a 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 @@ -5,7 +5,6 @@ import android.content.Intent import android.content.SharedPreferences import android.graphics.Color import android.os.Bundle -import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup @@ -20,7 +19,6 @@ import com.example.hpostesting.data.model.patient.DeviceData import com.example.hpostesting.data.model.patient.toHemoCubeTestData import com.example.hpostesting.presentation.UsbServiceListener import com.example.hpostesting.presentation.dashboard.DashboardActivity -import com.example.hpostesting.presentation.diagnostics.DiagnosticsActivity import com.example.hpostesting.presentation.utils.MyDialogListener import com.example.hpostesting.presentation.utils.UIUtils import com.google.firebase.crashlytics.ktx.crashlytics @@ -35,7 +33,7 @@ class HemoCubeFragment : Fragment() { private lateinit var binding: FragmentHemoCubeReferenceBinding private val hemoCubeViewModel: HemoCubeViewModel by activityViewModels() private lateinit var sharedPreferences: SharedPreferences - val testDetails = DataHolder.selectedTest?.toHemoCubeTestData() + private val testDetails = DataHolder.selectedTest?.toHemoCubeTestData() private var isOnline = false private var currentDeviceData: DeviceData? = null private var resultData: String = "" @@ -95,7 +93,7 @@ class HemoCubeFragment : Fragment() { binding.btnSamplestart.setOnClickListener { activity?.runOnUiThread { binding.tvSubtitle4.visibility = View.VISIBLE - binding.tvSubtitle4.text = "Sample Started" +// binding.tvSubtitle4.text = "Sample Started" } startSampleProcess() it.visibility = View.GONE @@ -423,19 +421,19 @@ class HemoCubeFragment : Fragment() { ) { validationError = true activity?.runOnUiThread { - binding.errorMessage.text = "Error: Invalid Test. Blank reading is too low" + binding.errorMessage.text = "Error: Invalid Test. Improper buffer reading" binding.errorMessage.visibility = View.VISIBLE } } - if (led1BufferForDevice > Constants.BUFFER_LED_HIGHER_BOUND - || led2BufferForDevice > Constants.BUFFER_LED_HIGHER_BOUND - || led3BufferForDevice > Constants.BUFFER_LED_HIGHER_BOUND - || led4BufferForDevice > Constants.BUFFER_LED_HIGHER_BOUND + if (led1BufferForDevice > Constants.BUFFER_LED_UPPER_BOUND + || led2BufferForDevice > Constants.BUFFER_LED_UPPER_BOUND + || led3BufferForDevice > Constants.BUFFER_LED_UPPER_BOUND + || led4BufferForDevice > Constants.BUFFER_LED_UPPER_BOUND ) { validationError = true activity?.runOnUiThread { - binding.errorMessage.text = "Error: Invalid Test. Blank reading is too high" + binding.errorMessage.text = "Error: Invalid Test. Improper buffer reading" binding.errorMessage.visibility = View.VISIBLE } }