calibration calculation done
This commit is contained in:
@@ -74,6 +74,8 @@ class HemoCubeFragment : Fragment() {
|
||||
|
||||
hemoCubeViewModel.getDeviceData("DEVICE1")
|
||||
|
||||
// hemoCubeViewModel.getDeviceData(sharedPreference.getString(Constants.USER_ID, "").toString())
|
||||
|
||||
hemoCubeViewModel.deviceData.observe(viewLifecycleOwner) {
|
||||
deviceData = it
|
||||
Toast.makeText(requireContext(), calculateRatio(0.17).toString(), Toast.LENGTH_SHORT).show()
|
||||
@@ -318,6 +320,6 @@ class HemoCubeFragment : Fragment() {
|
||||
// val c2 = deviceData?.coefficients?.get(1)!!
|
||||
val c1 = deviceData?.coefficients?.get(0)!!
|
||||
val c2 = deviceData?.coefficients?.get(1)!!
|
||||
return c1 * ratio - c2
|
||||
return c1 * ratio + c2
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user