-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.py
executable file
·51 lines (37 loc) · 2.09 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#This is the config file for the Bangbot Script
#The bash script and the configuration can be run immediately for usb phone connections
#If you want to run the script over wifi please visit the scrcpy doc page and configute the script accordingly!
#https://github.com/Genymobile/scrcpy
#Scrcpy Configuration
#This is the image capture bit_rate. Defaut value for me is 2M.
bit_rate='2M'
#This is the max size of one display dimension of a device. The other is set accordingly to preserve aspect ratio. I set default value to 700.
max_size=700
#These are the cv2 configurations required for the hough algorithm that finds circles.
#You can play with these parameters and tune them if you like. If you achieve better perfomance send me a mail please.
#In order to tune them please refer to the openCV documentation page
#https://opencv-python-tutroals.readthedocs.io/en/latest/
#https://docs.opencv.org/master/dd/d1a/group__imgproc__feature.html#ga47849c3be0d0406ad3ca45db65a25d2d
Gaus_blur = (5,5) #default=(5,5)
median_blur = 5 #default=5
Inverse_ratio=1 #default=1
min_dist=30 #default=30
param1=50 #default=50
param2=30 #default=30
min_radius=5 #default=5
max_radius=60 #default=60
#Monitor and function configuration
#Here you can set the monitor values, in order to capture a piece of your monitor (The place where you put your phone's screen)
#I didn't find a way to just capture a standard window and get rid of these but maybe someone else can.
#By default, you will find the values I used for my Xiaomi MI A2 lite.
top=55
left=1065
width=300
height=640
#The last value is used for the sleep function.
#It sets the time that the program needs to wait in order to avoid the smartphone screen being locked and rejecting all input.
#The click height negate variable, stores the pixel under which you can click anything.
#This is to avoid clicking circles found on the timer or the points collected and losing time.
timesleep=0.08
click_height_negate=78
#For me 0.08 seemed to work best, but this depends on your processor and battery amount, so be sure to not have very low battery when using the script!