remove debuging code and fix conflicts

This commit is contained in:
Pritimay Sarkar
2024-01-16 15:10:57 +05:30
parent 39ef1665fa
commit fc1544e90d
5 changed files with 4 additions and 23 deletions

View File

@@ -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.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)
abstract class MyDatabase : RoomDatabase() {
abstract fun userDao(): UserDao

View File

@@ -11,12 +11,10 @@ data class UserData(
var name: String = "",
var incubationTime: String = "",
var gender: String = "",
var state: String = "",
var birthYear: String = "",
var abhaId: String = "",
var bloodGroup: String = "",
var userImageURL: String = "",
var gender: String ="",
var location: Location? = null,
var createdBy: String? = "",
var reportUploadTime: String? = "",
@@ -56,10 +54,6 @@ fun UserData.toHemoCubeTestData() = HemoCubeTestData(
userImageURL = userImageURL,
testStatus = testStatus,
location = location,
gender = gender,
state = state,
abhaId = abhaId,
bloodGroup = bloodGroup,
prdClassification = prdClassification,
testTime = testTime
)

View File

@@ -118,19 +118,6 @@ class HomeFragment : Fragment() {
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 ->
if (result == "Success") {
Toast.makeText(

View File

@@ -51,7 +51,7 @@ class DeviceFragment : Fragment() {
private fun getDeviceId() {
deviceViewModel.progressBar.postValue(true)
(activity as DeviceActivity).mService.sendAndListenToHemoCube(
HemoCubeCommands.getDeviceId,
HemoCubeCommands.DEVICE_CONFIGURATION_COMMAND,
object : UsbServiceListener {
@SuppressLint("SetTextI18n")
override fun onUsbRead(data: ByteArray?) {

View File

@@ -1027,8 +1027,8 @@ class HemoCubeFragment : Fragment() {
}
private fun calculateRatio(ratio: Double): Double {
val coefficient1: Double = (Constants.COEFFICIENTS[loginId]?.get(0)?.get(0)) as Double
val coefficient2: Double = (Constants.COEFFICIENTS[loginId]?.get(1)?.get(0)) as Double
val coefficient1 = currentDeviceData?.coefficients?.get(0) ?: 0.0
val coefficient2 = currentDeviceData?.coefficients?.get(1) ?: 0.0
return coefficient1 * ratio + coefficient2
}
}