Code Monkey home page Code Monkey logo

Comments (4)

dantmnf avatar dantmnf commented on June 25, 2024

如果可以让游戏全屏(无黑边)运行,那么可以通过 wm size 命令调整分辨率。

Android 直到目前(AOSP master)依然无法针对某个窗口进行截图和控制,小窗/黑边基本上无解:#338#268

from arknightsautohelper.

HowcanoeWang avatar HowcanoeWang commented on June 25, 2024

如果可以让游戏全屏(无黑边)运行,那么可以通过 wm size 命令调整分辨率。

Android 直到目前(AOSP master)依然无法针对某个窗口进行截图和控制,小窗/黑边基本上无解:#338#268

全屏无黑边就是正常的游玩模式,wm size是不是后面还要跟一个参数?翻了一圈没找到API文档,尝试下面代码都不行

python akhelper-gui.pyw wm size

python akhelper-gui.pyw wm size 2160x1080

python akhelper-gui.pyw wm 2160x1080

http://127.0.0.1:46127/?token=1145141919
/home/hwang/Programs/miniconda3/envs/arkautohelper/lib/python3.9/subprocess.py:1048: ResourceWarning: subprocess 33969 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
kf.kio.core: Malformed JSON protocol file for protocol: "trash" , number of the ExtraNames fields should match the number of ExtraTypes fields
正在现有浏览器会话中打开。
received request {'type': 'web:authorize', 'token': '1145141919'}
client authorized
spawning worker process
starting worker loop
starting worker process
starting worker thread
sending notify web:version 'master-1152+32cfe03'
starting worker process loop
sending notify web:availiable-devices ['R52T40HWCCM (adb connected)', '127.0.0.1:5555 (append)', '127.0.0.1:7555 (append)']
sending notify worker:idle None
received request {'type': 'call', 'action': 'worker:set_refill_with_item', 'args': [True], 'tag': 'Call#0@1660576670781'}
sending notify worker:busy None
sending notify worker:idle None
received request {'type': 'call', 'action': 'worker:set_refill_with_originium', 'args': [False], 'tag': 'Call#1@1660576670798'}
sending notify worker:busy None
sending notify worker:idle None
received request {'type': 'call', 'action': 'worker:set_max_refill_count', 'args': [0], 'tag': 'Call#2@1660576670844'}
sending notify worker:busy None
sending notify worker:idle None
received request {'type': 'call', 'action': 'worker:module_battle_slim', 'args': [10], 'tag': 'Call#3@1660576670888'}
sending notify worker:busy None
 Ξ 设备当前分辨率(2800x1752)不符合要求
 Ξ 需要宽高比等于或大于 16∶9,且渲染高度不小于 720。
sending alert warn 设备当前分辨率(2800x1752)不符合要求 需要宽高比等于或大于 16∶9,且渲染高度不小于 720。 None
sending notify current-device 'eeb9c72ef95380fc'
sending notify worker:idle None

GUI内报错

ValueError: too many values to unpack (expected 2)

  File "/home/hwang/Programs/ArknightsAutoHelper/webgui2/worker.py", line 122, in run
    return_value = func(*args)
  File "/home/hwang/Programs/ArknightsAutoHelper/webgui2/worker.py", line 87, in <lambda>
    "worker:module_battle_slim": lambda count: self.helper.addon('CombatAddon').combat_on_current_stage(int(count)) and None,
  File "/home/hwang/Programs/ArknightsAutoHelper/Arknights/addons/combat.py", line 122, in combat_on_current_stage
    self.operation_once_statemachine(c_id, )
  File "/home/hwang/Programs/ArknightsAutoHelper/Arknights/addons/combat.py", line 395, in operation_once_statemachine
    smobj.state(smobj)
  File "/home/hwang/Programs/ArknightsAutoHelper/Arknights/addons/combat.py", line 158, in on_prepare
    recoresult = imgreco.before_operation.recognize(screenshot)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/before_operation.py", line 102, in recognize
    opidtext = stage_reco(opidimg)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/before_operation.py", line 73, in stage_reco
    return engine.recognize(img, tessedit_char_whitelist='SN-0123456789', tessedit_pageseg_mode='13').text.replace(' ', '')
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/ocr/tesseract/cli.py", line 42, in recognize
    for key, value in kwargs:

from arknightsautohelper.

dantmnf avatar dantmnf commented on June 25, 2024

是在 adb shell 里运行 wm size 宽度x高度

from arknightsautohelper.

HowcanoeWang avatar HowcanoeWang commented on June 25, 2024

是在 adb shell 里运行 wm size 宽度x高度

调整了之后确实可以运行了!

但是每次行动结束,控制台里都会报下面的错误,但不影响运行

Ξ 战斗结束
sending notify wait {'duration': 0.5, 'allow_skip': False}
sending notify wait {'duration': 0, 'allow_skip': False}
sending notify wait {'duration': 0.5, 'allow_skip': False}
sending notify wait {'duration': 0, 'allow_skip': False}
sending notify wait {'duration': 0.5, 'allow_skip': False}
sending notify wait {'duration': 0, 'allow_skip': False}
 Ξ 
Traceback (most recent call last):
  File "/home/hwang/Programs/ArknightsAutoHelper/Arknights/addons/combat.py", line 362, in on_end_operation
    drops = imgreco.end_operation.recognize(smobj.prepare_reco['style'], screenshot, True)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/end_operation.py", line 276, in recognize
    return recognize_ep10(im, learn_unrecognized_item)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/end_operation.py", line 431, in recognize_ep10
    groupresult = tell_group_ep10(group, session, linetop - 71.111*vh, linebottom - 71.111*vh)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/end_operation.py", line 91, in tell_group_ep10
    groupname, diff = tell_group_name_ocr(thim, session)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/end_operation.py", line 162, in tell_group_name_ocr
    ocr_result = engine.recognize(invimg, char_whitelist=all_chars)
  File "/home/hwang/Programs/ArknightsAutoHelper/imgreco/ocr/tesseract/cli.py", line 42, in recognize
    for key, value in kwargs:
ValueError: too many values to unpack (expected 2)
 Ξ 离开结算画面
sending notify wait {'duration': 1.024755686263508, 'allow_skip': False}
sending notify wait {'duration': 0, 'allow_skip': False}
 Ξ  2 次作战完成

from arknightsautohelper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.