Skip to content
Permalink
Browse files

Merge pull request #11 from J-G-Froejk/master

Regex and Logcat tag chg feb/mar 2020
  • Loading branch information
esauvisky committed Mar 10, 2020
2 parents 235cf6f + bcbe2be commit 1ae83ad05e1e96834364f03785ffc39963009cb2
Showing with 3 additions and 2 deletions.
  1. +2 −1 ivcheck.py
  2. +1 −1 pokemonlib.py
@@ -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 .+$")
@@ -80,7 +80,7 @@ def __init__(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,

0 comments on commit 1ae83ad

Please sign in to comment.
You can’t perform that action at this time.