Handled case of device giving output as "FINE" on first run sometimes.
This commit is contained in:
@@ -7,6 +7,7 @@ import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.Toast
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.activityViewModels
|
||||
import com.example.hpos.R
|
||||
@@ -73,7 +74,7 @@ class TestRightExpReference : Fragment() {
|
||||
|
||||
override fun onClickBtnTwo() {
|
||||
// Todo: Only for testing
|
||||
viewModel.progressBar.postValue(true)
|
||||
// viewModel.progressBar.postValue(true)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -127,12 +128,11 @@ class TestRightExpReference : Fragment() {
|
||||
)
|
||||
viewModel.mapDeviceConstants(fullReadOutput.toString())
|
||||
viewModel.progressBar.postValue(false)
|
||||
} else if (stringData.contains("FINE", true)){
|
||||
Log.d(TAG, "results = FINE")
|
||||
viewModel.progressBar.postValue(false)
|
||||
Toast.makeText(requireContext(), "Please try again this step", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
// else if (recursive && stringData.contains("FINE", true)){
|
||||
// Log.d(TAG, "results = FINE and calling again")
|
||||
// viewModel.progressBar.postValue(false)
|
||||
// sendCmdToFetchDeviceConstant(false)
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user