Flush Buffer value

This commit is contained in:
mohamedkaif356
2023-09-07 08:12:57 +05:30
parent ade2d2459e
commit 28d9bedffe

View File

@@ -156,6 +156,10 @@ class HBHemoCubeFragment : Fragment() {
override fun onClickNegativeButton() {
listenToHemoCube()
startBufferProcess()
with(sharedPreferences.edit()) {
putString(Constants.HB_BUFFER_VALUE_1, "")
apply()
}
}
override fun onClickPositiveButton() {
@@ -297,7 +301,7 @@ class HBHemoCubeFragment : Fragment() {
led1Buffer = led1BufferForDevice
this.led1Sample = led1Sample
this.led1Average = led1Average
this.hbEstimation = calculateRatio(led1Average)
this.hbEstimation = ((led1Average-0.0177)/0.0237)
this.resultData = fullReadOutput
if (!isBufferValueAvailable()) {
with(sharedPreferences.edit()) {