remove debuging code and fix conflicts
This commit is contained in:
@@ -8,7 +8,7 @@ import com.example.hpostesting.data.model.patient.DeviceData
|
|||||||
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
|
||||||
|
|
||||||
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class, BufferCheckData::class], version = 22, exportSchema = false)
|
@Database(entities = [UserData::class, HemoCubeTestData::class, DeviceData::class, BufferCheckData::class], version = 23, exportSchema = false)
|
||||||
@TypeConverters(Converters::class)
|
@TypeConverters(Converters::class)
|
||||||
abstract class MyDatabase : RoomDatabase() {
|
abstract class MyDatabase : RoomDatabase() {
|
||||||
abstract fun userDao(): UserDao
|
abstract fun userDao(): UserDao
|
||||||
|
|||||||
@@ -11,12 +11,10 @@ data class UserData(
|
|||||||
var name: String = "",
|
var name: String = "",
|
||||||
var incubationTime: String = "",
|
var incubationTime: String = "",
|
||||||
var gender: String = "",
|
var gender: String = "",
|
||||||
var state: String = "",
|
|
||||||
var birthYear: String = "",
|
var birthYear: String = "",
|
||||||
var abhaId: String = "",
|
var abhaId: String = "",
|
||||||
var bloodGroup: String = "",
|
var bloodGroup: String = "",
|
||||||
var userImageURL: String = "",
|
var userImageURL: String = "",
|
||||||
var gender: String ="",
|
|
||||||
var location: Location? = null,
|
var location: Location? = null,
|
||||||
var createdBy: String? = "",
|
var createdBy: String? = "",
|
||||||
var reportUploadTime: String? = "",
|
var reportUploadTime: String? = "",
|
||||||
@@ -56,10 +54,6 @@ fun UserData.toHemoCubeTestData() = HemoCubeTestData(
|
|||||||
userImageURL = userImageURL,
|
userImageURL = userImageURL,
|
||||||
testStatus = testStatus,
|
testStatus = testStatus,
|
||||||
location = location,
|
location = location,
|
||||||
gender = gender,
|
|
||||||
state = state,
|
|
||||||
abhaId = abhaId,
|
|
||||||
bloodGroup = bloodGroup,
|
|
||||||
prdClassification = prdClassification,
|
prdClassification = prdClassification,
|
||||||
testTime = testTime
|
testTime = testTime
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -118,19 +118,6 @@ class HomeFragment : Fragment() {
|
|||||||
setUserId()
|
setUserId()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
viewModel.networkStatusLiveData?.observe(viewLifecycleOwner) { isConnected ->
|
|
||||||
// if (isConnected) {
|
|
||||||
// binding.internetAvailableCL.visibility = View.VISIBLE
|
|
||||||
// binding.internetNotAvailableCL.visibility = View.GONE
|
|
||||||
// loadUserData()
|
|
||||||
// setSearch()
|
|
||||||
// checkForLocalDBData()
|
|
||||||
// } else {
|
|
||||||
binding.internetAvailableCL.visibility = View.GONE
|
|
||||||
binding.internetNotAvailableCL.visibility = View.VISIBLE
|
|
||||||
setUserId()
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
hemoCubeViewModel.fireBaseBulkUpload.observe(viewLifecycleOwner) { result ->
|
hemoCubeViewModel.fireBaseBulkUpload.observe(viewLifecycleOwner) { result ->
|
||||||
if (result == "Success") {
|
if (result == "Success") {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class DeviceFragment : Fragment() {
|
|||||||
private fun getDeviceId() {
|
private fun getDeviceId() {
|
||||||
deviceViewModel.progressBar.postValue(true)
|
deviceViewModel.progressBar.postValue(true)
|
||||||
(activity as DeviceActivity).mService.sendAndListenToHemoCube(
|
(activity as DeviceActivity).mService.sendAndListenToHemoCube(
|
||||||
HemoCubeCommands.getDeviceId,
|
HemoCubeCommands.DEVICE_CONFIGURATION_COMMAND,
|
||||||
object : UsbServiceListener {
|
object : UsbServiceListener {
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
override fun onUsbRead(data: ByteArray?) {
|
override fun onUsbRead(data: ByteArray?) {
|
||||||
|
|||||||
@@ -1027,8 +1027,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun calculateRatio(ratio: Double): Double {
|
private fun calculateRatio(ratio: Double): Double {
|
||||||
val coefficient1: Double = (Constants.COEFFICIENTS[loginId]?.get(0)?.get(0)) as Double
|
val coefficient1 = currentDeviceData?.coefficients?.get(0) ?: 0.0
|
||||||
val coefficient2: Double = (Constants.COEFFICIENTS[loginId]?.get(1)?.get(0)) as Double
|
val coefficient2 = currentDeviceData?.coefficients?.get(1) ?: 0.0
|
||||||
return coefficient1 * ratio + coefficient2
|
return coefficient1 * ratio + coefficient2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user