|
@@ -9,7 +9,7 @@ import cv2
|
|
|
|
|
|
cv2.namedWindow('View', cv2.WINDOW_NORMAL)
|
|
|
DEFAULT_MONITOR = 3
|
|
|
-DEBUG = False
|
|
|
+DEBUG = True
|
|
|
scheduler = sched.scheduler(time, sleep)
|
|
|
dilation_kernel = np.array([[0,0,0], [1, 1, 1], [0,0,0]]).astype('uint8')
|
|
|
|
|
@@ -124,7 +124,7 @@ if __name__ == '__main__':
|
|
|
dino_min_y = dino_pos[0].max()
|
|
|
dino_max_y = dino_pos[0].min()
|
|
|
|
|
|
- coef = 0.9
|
|
|
+ coef = 1
|
|
|
trigger_second = (int(dino_pos[0].mean()), int(dino_max_x + int(coef*10)*pw))
|
|
|
trigger_feather = (dino_max_y, int(dino_max_x + int(coef*12)*pw))
|
|
|
jumping = False
|
|
@@ -147,7 +147,7 @@ if __name__ == '__main__':
|
|
|
gui.keyDown('space')
|
|
|
jumping = True
|
|
|
|
|
|
- elif jumping and binScreen[trigger_second[0], trigger_second[1]+(int(coef-1)*pw)] == 0 and binScreen[trigger_feather[0], trigger_feather[1]+(int(coef-1)*pw)] == 0:
|
|
|
+ elif jumping and binScreen[trigger_second[0], trigger_second[1]+(int(coef-1.2)*pw)] == 0 and binScreen[trigger_feather[0], trigger_feather[1]+(int(coef-1.2)*pw)] == 0:
|
|
|
print('taking')
|
|
|
gui.keyUp('space')
|
|
|
gui.keyDown('down')
|
|
@@ -159,12 +159,13 @@ if __name__ == '__main__':
|
|
|
gui.keyUp('down')
|
|
|
taking = False
|
|
|
|
|
|
- if time() - start2 == 7:
|
|
|
+ if time() - start2 > 15/coef:
|
|
|
+ print(coef)
|
|
|
print('speeded')
|
|
|
coef += 0.2
|
|
|
start2 = time()
|
|
|
|
|
|
- if time() - start > 30:
|
|
|
+ if time() - start > 15:
|
|
|
print(time() - start)
|
|
|
trigger_second = (trigger_second[0], trigger_second[1]+pw)
|
|
|
trigger_feather = (trigger_feather[0], trigger_feather[1]+pw)
|