From cddfc4518f397008771ca889b5f06b2afec02824 Mon Sep 17 00:00:00 2001 From: Pritimay Sarkar Date: Fri, 5 Jan 2024 01:16:55 +0530 Subject: [PATCH] add key not found error in config --- .../presentation/hemocube/HemoCubeFragment.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt b/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt index 387c17b..b328767 100644 --- a/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt +++ b/app/src/main/java/com/example/hpostesting/presentation/hemocube/HemoCubeFragment.kt @@ -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") }