add key not found error in config

This commit is contained in:
Pritimay Sarkar
2024-01-05 01:16:55 +05:30
parent 36ed59bda4
commit cddfc4518f

View File

@@ -362,6 +362,15 @@ class HemoCubeFragment : Fragment() {
apply()
}
this.testStatusCode = Constants.TEST_STATUS_CODE_CONFIG_COMPLETED
if (!Constants.DEVICE_CONFIGURATION.containsKey(deviceHardwareId)) {
allErrorMessages += "Calibration configuration for this device id is not found"
Toast.makeText(requireContext(), "Calibration configuration for this device id is not found", Toast.LENGTH_SHORT).show()
}
if (!Constants.BUFFER_INTENSITY_THRESHOLDS.containsKey(deviceHardwareId)) {
allErrorMessages += "ADC thresholds for this device id are not found"
Toast.makeText(requireContext(), "ADC thresholds for this device id are not found", Toast.LENGTH_SHORT).show()
}
} else {
hemoCubeViewModel.messages.postValue("Config error")
}