Added L command testing in HemoCubeFragment
This commit is contained in:
@@ -65,12 +65,14 @@
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.assurance.AssuranceControlsActivity"
|
||||
android:exported="false"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"/>
|
||||
|
||||
<activity
|
||||
android:name="com.example.hpostesting.presentation.hemocube.HemocubeActivity"
|
||||
android:exported="false"
|
||||
android:noHistory="true"
|
||||
android:screenOrientation="portrait"
|
||||
android:parentActivityName="com.example.hpostesting.presentation.MainActivity"
|
||||
android:theme="@style/Theme.HPOS.NoActionBar"
|
||||
android:windowSoftInputMode="adjustPan" />
|
||||
|
||||
@@ -125,10 +125,8 @@ class HemoCubeFragment : Fragment() {
|
||||
it.visibility = View.GONE
|
||||
}
|
||||
binding.btnRetryCheckCuvette.setOnClickListener {
|
||||
|
||||
checkCuvettePresence()
|
||||
activity?.runOnUiThread {
|
||||
binding.btnRetryCheckCuvette.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
binding.btnPlacebuffer.setOnClickListener {
|
||||
if (isBufferValueAvailable() || !Constants.BLANK_EVERY_TEST) {
|
||||
@@ -432,7 +430,7 @@ class HemoCubeFragment : Fragment() {
|
||||
this.testStatusCode = TestStatus.CUVETTE_PRESENT.code
|
||||
showStartBufferButton()
|
||||
}
|
||||
resultData.contains("#AIN") && this.testStatusCode < TestStatus.CUVETTE_ABSENT.code -> {
|
||||
resultData.contains("#AIN") && this.testStatusCode <= TestStatus.CUVETTE_ABSENT.code -> {
|
||||
hemoCubeViewModel.messages.postValue(getString(R.string.cuvette_absent))
|
||||
this.testStatusCode = TestStatus.CUVETTE_ABSENT.code
|
||||
showRetryButtonForCuvette()
|
||||
@@ -708,6 +706,8 @@ class HemoCubeFragment : Fragment() {
|
||||
|
||||
fun showStartBufferButton() {
|
||||
activity?.runOnUiThread {
|
||||
binding.btnRetryCheckCuvette.visibility = View.GONE
|
||||
|
||||
binding.btnPlacebuffer.visibility = View.VISIBLE
|
||||
}
|
||||
hemoCubeViewModel.messages.postValue(getString(R.string.start))
|
||||
@@ -1161,6 +1161,10 @@ class HemoCubeFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun checkCuvettePresence() {
|
||||
activity?.runOnUiThread {
|
||||
binding.btnRetryCheckCuvette.visibility = View.GONE
|
||||
}
|
||||
|
||||
hemoCubeViewModel.progressBar.postValue(true)
|
||||
|
||||
(activity as HemocubeActivity).mService.sendAndListenToHemoCube(HemoCubeCommands.CHECK_CUVETTE_COMMAND,
|
||||
|
||||
Reference in New Issue
Block a user