-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Mi8 templates #6
base: master
Are you sure you want to change the base?
Conversation
Add: templates for Mi8(dipper) with 400dpi screen Add: function to collect own forest energy Fix: swipe will no more trigger back gesture on MIUI Optimize: code structure TODO: more reasonable time gap strip adb operations from @Class Ant
The changes are most focused on coding style and "os.system" to subprocess, right? Anything else I missed? And any bugfix in this PR? |
for _ in range(50): | ||
self.scanMonitor(0.1) | ||
rc = self.getIconPos('farm_medal_template', 0.8) | ||
if not rc: | ||
break | ||
rc = self.getIconPos('farm_thief_flag_template', 0.8) | ||
if not rc: | ||
self.swipe(self.width // 2, self.height - 10, self.width // 2, self.height // 1.5, 600 ) | ||
self.swipe(self.width // 2, self.height - 250, self.width // 2, self.height // 2, 600 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
swipe-up from very bottom may trigger "back to home" gesture on ROMs with full screen gestures.
so i shift up this swipe-up here.
errorMsg('Cannot locate your zhifubao app correctly.') | ||
|
||
def findMoreFriends(self): | ||
for i in range(5): | ||
self.swipe(self.width // 2, self.height - 10, self.width // 2, self.height // 2, 400 ) | ||
self.swipe(self.width // 2, self.height - 250, self.width // 2, self.height // 2, 400 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shift up swipe-up again
break | ||
|
||
def getOwnEnergy(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot go back to one's own forest from friend list.
so add a function to collect own energy at entering the forest interface.
|
||
def playForest(self): | ||
self.checkForest() | ||
self.getOwnEnergy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run getOwnEnergy()
immediately after launching the forest interface
Some bugfix changes are:
|
Hello!
I added the English templates for Mi8(dipper) with 400dpi screen, and optimized (at least) main function. if you wanna cherry-pick some of the code changes, please do it. ^_^
and... sorry that i forgot to edit README