Skip to content

Commit

Permalink
Merge pull request #11 from J-G-Froejk/master
Browse files Browse the repository at this point in the history
Regex and Logcat tag chg feb/mar 2020
  • Loading branch information
esauvisky committed Mar 10, 2020
2 parents 235cf6f + bcbe2be commit 1ae83ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ivcheck.py
Expand Up @@ -38,7 +38,8 @@ def not_in_func(a, b):
ch.setFormatter(formatter)
logger.addHandler(ch)

RE_CALCY_IV = re.compile(r"^.\/i (\(\s*\d+\)){0,1}: Received values: Id: -{0,1}\d+ {0,1}\({0,1}(?P<name>[^\(\)]+){0,1}\){0,1}, Nr: (?P<id>-{0,1}\d+), CP: (?P<cp>-{0,1}\d+), Max HP: (?P<max_hp>-{0,1}\d+), Dust cost: (?P<dust_cost>-{0,1}\d+), Level: (?P<level>\-{0,1}[\d\.]+), FastMove (?P<fast_move>.+), SpecialMove (?P<special_move>.+), SpecialMove2 (?P<special_move2>.+), Gender (?P<gender>.+), CatchYear (?P<catch_year>.+), Favorite: (?P<favorite>(false|true)), Level-up (true|false):$")
#JGF07feb2020 - old: RE_CALCY_IV = re.compile(r"^.\/i (\(\s*\d+\)){0,1}: Received values: Id: -{0,1}\d+ {0,1}\({0,1}(?P<name>[^\(\)]+){0,1}\){0,1}, Nr: (?P<id>-{0,1}\d+), CP: (?P<cp>-{0,1}\d+), Max HP: (?P<max_hp>-{0,1}\d+), Dust cost: (?P<dust_cost>-{0,1}\d+), Level: (?P<level>\-{0,1}[\d\.]+), FastMove (?P<fast_move>.+), SpecialMove (?P<special_move>.+), SpecialMove2 (?P<special_move2>.+), Gender (?P<gender>.+), CatchYear (?P<catch_year>.+), Favorite: (?P<favorite>(false|true)), Level-up (true|false):$")
RE_CALCY_IV = re.compile(r"^.\/j\s*\(\s*\d+\): Received values: Id\(s\): (?P<name>\w+[-. \W+\w+]*) \((?P<id>\d+[,\d+]*)\), CP: (?P<cp>-{0,1}\d+), HP: (?P<max_hp>-{0,1}\d+), Level\(s\): (?P<level>\-{0,1}[\d\.]+), Dust: (?P<dust_cost>-{0,1}\d+), FastMove: (?P<fast_move>\w+[- \w+]*), SpecialMove: (?P<special_move>\w+[- \w+]*), SpecialMove2: (?P<special_move2>\w+[- \w+]*), Gender: (?P<gender>\w+), Lucky: (?:YES|NO), CatchYear: (?P<catch_year>\w+), Favorite: (?P<favorite>(?:false|true)), TLevel-up: (?:true|false)$")
RE_RED_BAR = re.compile(r"^.+\(\s*\d+\): Screenshot #\d has red error box at the top of the screen$")
RE_SUCCESS = re.compile(r"^.+\(\s*\d+\): calculateScanOutputData finished after \d+ms$")
RE_SCAN_INVALID = re.compile(r"^.+\(\s*\d+\): Scan invalid .+$")
Expand Down
2 changes: 1 addition & 1 deletion pokemonlib.py
Expand Up @@ -80,7 +80,7 @@ async def start_logcat(self):
#logger.debug("Running pidof calcy got code %d: %s", return_code, stdout)
#self.calcy_pid = stdout.decode('utf-8').strip()
# cmd = ["adb", "-s", await self.get_device(), "logcat", "-T", "1", "-v", "brief", "--pid", self.calcy_pid]
cmd = ["adb", "-s", await self.get_device(), "logcat", "-T", "1", "-v", "brief" , "MainService:D i:D ClipboardReceiver:D *:S"]
cmd = ["adb", "-s", await self.get_device(), "logcat", "-T", "1", "-v", "brief" , "MainService:D j:D ClipboardReceiver:D *:S"]
logger.info("Starting logcat %s", cmd)
self.logcat_task = await asyncio.create_subprocess_exec(
*cmd,
Expand Down

0 comments on commit 1ae83ad

Please sign in to comment.