fix device constant error
This commit is contained in:
@@ -80,16 +80,19 @@ object Constants {
|
|||||||
|
|
||||||
val DEVICE_CONFIGURATION: Map<String, List<List<Double>>> = mapOf<String, List<List<Double>>>(
|
val DEVICE_CONFIGURATION: Map<String, List<List<Double>>> = mapOf<String, List<List<Double>>>(
|
||||||
"HCV-000-3001" to listOf(
|
"HCV-000-3001" to listOf(
|
||||||
listOf(1.264817, -0.85965), // LED1
|
listOf(1.264817, -0.85965), // LED1, 435nm
|
||||||
listOf(0.581462456, -0.58502), // LED2
|
listOf(0.581462456, -0.58502), // LED2, 415nm
|
||||||
listOf(0.184991, 0.184991), // LED3
|
listOf(0.184991, 0.001704), // LED3, 555nm
|
||||||
listOf(1.0, 0.0) // LED4
|
listOf(1.0, 0.0) // LED4
|
||||||
),
|
),
|
||||||
"HCV-000-3002" to listOf(
|
"HCV-000-3002" to listOf(
|
||||||
listOf(1.264817, -0.85965), // LED1
|
listOf(1.264817, -0.85965),
|
||||||
listOf(0.581462456, -0.58502), // LED2
|
listOf(0.581462456, -0.58502),
|
||||||
listOf(0.184991, 0.184991), // LED3
|
listOf(0.184991, 0.001704),
|
||||||
listOf(1.0, 0.0) // LED4
|
listOf(1.0, 0.0)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const val INCUBATION_TIME_MIN = 15
|
||||||
|
const val INCUBATION_TIME_MAX = 30
|
||||||
}
|
}
|
||||||
@@ -46,4 +46,9 @@ data class HemoCubeTestData(
|
|||||||
var coefficients: String? = "",
|
var coefficients: String? = "",
|
||||||
var classificationResult: String = "",
|
var classificationResult: String = "",
|
||||||
var prdClassification: String = "",
|
var prdClassification: String = "",
|
||||||
|
var batteryLevel: String = "",
|
||||||
|
var batteryCapacity: String = "",
|
||||||
|
var batteryMaxCapacity: String = "",
|
||||||
|
var batteryTemperature: String = "",
|
||||||
|
var batteryVoltage: String = "",
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import androidx.recyclerview.widget.AsyncListDiffer
|
|||||||
import androidx.recyclerview.widget.DiffUtil
|
import androidx.recyclerview.widget.DiffUtil
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.example.hpostesting.data.DataHolder
|
import com.example.hpostesting.data.DataHolder
|
||||||
|
import com.example.hpostesting.data.constant.Constants
|
||||||
import com.example.hpostesting.data.model.patient.HemoCubeTestData
|
import com.example.hpostesting.data.model.patient.HemoCubeTestData
|
||||||
import com.example.hpostesting.data.model.patient.UserData
|
import com.example.hpostesting.data.model.patient.UserData
|
||||||
import `in`.sminnovations.hpostesting.R
|
import `in`.sminnovations.hpostesting.R
|
||||||
@@ -74,13 +75,13 @@ class OfflineUserListAdapter(private val view: View, private val batLevel: Int)
|
|||||||
).show()
|
).show()
|
||||||
} else {
|
} else {
|
||||||
if (userList.incubationTime != "") {
|
if (userList.incubationTime != "") {
|
||||||
if (isBetween15And30Minutes(userList.incubationTime) < 15) {
|
if (isBetween15And30Minutes(userList.incubationTime) < Constants.INCUBATION_TIME_MIN) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
view.context,
|
view.context,
|
||||||
"Incubation has not completed 15 minutes",
|
"Incubation has not completed 15 minutes",
|
||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
} else if (isBetween15And30Minutes(userList.incubationTime) > 30) {
|
} else if (isBetween15And30Minutes(userList.incubationTime) > Constants.INCUBATION_TIME_MAX) {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
view.context,
|
view.context,
|
||||||
"Incubation crossed 30 minutes, need to repeat the incubation",
|
"Incubation crossed 30 minutes, need to repeat the incubation",
|
||||||
|
|||||||
Reference in New Issue
Block a user