def main_Parallel(self):
# param_dict = {}
# param_dict["wait_sec"] = 20*60
# param_dict["SUPPLY_FLAG"] = True
# param_dict["Bulk_FLAG"] = True
# param_dict["Home_FLAG"] = True
with open('param_dict.json') as f:
param_dict = json.load(f)
while 1:
# --------------------------------------------
# param save
#
with open('param_dict.json', 'w') as f:
json.dump(param_dict, f, indent=4)
with open('param_dict.json') as f:
param_dict = json.load(f)
detect_total_df = A2P.tap_temp_image5_Parallel()
print(detect_total_df)
print("-----")
detect_total_df2 = detect_total_df[detect_total_df["maxVal"] > self.search_th]
print(detect_total_df2)
if(len(detect_total_df2)==1):
temp_key = detect_total_df2["x"][0]
print(">>>>>> {}".format(temp_key))
self._tap_PC2Android(detect_total_df2["x"][0], detect_total_df2["y"][0])
if(self._key_tap("Exercise_no_try1", detect_total_df2, time_sleep=2) ):
param_dict["SUPPLY_FLAG"] = False
continue
if(self._key_tap("Exercise_no_try2", detect_total_df2, time_sleep=2) ):
param_dict["SUPPLY_FLAG"] = False
continue
if(self._key_tap("Exercise_no_try3", detect_total_df2, time_sleep=2) ):
param_dict["SUPPLY_FLAG"] = False
continue
if(self._key_tap("Exercise_no_try4", detect_total_df2, time_sleep=2) ):
param_dict["SUPPLY_FLAG"] = False
continue
if(self._key_tap("Exercise_no_try5", detect_total_df2, time_sleep=2) ):
param_dict["SUPPLY_FLAG"] = False
continue
if(self._key_tap("next_stage", detect_total_df2)): continue