Index: shared/scripts/configuration/utility.py =================================================================== diff -u -r44765c1ac1f4bd2fe890a30449bf72a746d7577c -r964d5afd05d3a278bad6a930d22a9c70f35ed39a --- shared/scripts/configuration/utility.py (.../utility.py) (revision 44765c1ac1f4bd2fe890a30449bf72a746d7577c) +++ shared/scripts/configuration/utility.py (.../utility.py) (revision 964d5afd05d3a278bad6a930d22a9c70f35ed39a) @@ -20,7 +20,6 @@ import os import names import sys - import squish import time import test @@ -37,11 +36,13 @@ from dialin.protocols import DenaliMessage, DenaliCanMessenger, DenaliChannels from datetime import datetime + LOG_LOCATION = "/home/denali/Desktop/sd-card/log/*.log" def color_verification(exp_val = "Red", act_val = "#c53b33"): test.compare(config.COLOR_CODES[color_name],(act_val.color[name])) + def check_if_object_is_within_the_container(obj=None, container=None): """ check if an object is inside a container @@ -65,30 +66,7 @@ return False -def scroll_to_zone(zone=None, screen_object=None, direction = None): - """ - scroll to the UI, if object is hidden - @param zone - object to be find out. - @param screen_object - object of the screen. - @return boolean - """ - counter = 0 - while counter <= 100: - try: - counter += 1 - squish.findObject(zone) - squish.snooze(0.5) - if check_if_object_is_within_the_container(obj=zone, container=screen_object): - return True - else: - raise RuntimeError - except RuntimeError: - ScreenObj = squish.waitForObject(screen_object) - screenHeight = pyInt(ScreenObj.height) - screenWidth = pyInt(ScreenObj.width) - squish.mouseWheel(ScreenObj, screenWidth//2, screenHeight//2, 0, -50, squish.Qt.NoModifier) - raise LookupError("value object is not in view to the user after trying 100 times") - + def pressure_pop_up_text_obj(text): names.o_pop_up_pressure_text_obj["text"] = text return names.o_pop_up_pressure_text_obj @@ -133,11 +111,6 @@ def vitals_reading_obj(reading): names.o_vitals_reading["text"] = reading return names.o_vitals_reading - -def keypad_input(key_value): - names.o_keypad_input["text"] = key_value - return names.o_keypad_input - def scroll_to_zone(zone=None, screen_object=None, direction = None): """