Ai
1 Star 1 Fork 4

cooler/ESP32_GRBL_WRITE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
builder.py 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
# This script is imported by build-machine.py and build-all.py
# It performs a platformio build with a given machine file.
# The verbose argument controls whether the full output is
# displayed, or filtered to show only summary information.
# extraArgs can be used to perform uploading after compilation.
from __future__ import print_function
import subprocess, os
env = dict(os.environ)
def buildMachine(baseName, verbose=True, extraArgs=None):
cmd = ['platformio','run']
if extraArgs:
cmd.append(extraArgs)
displayName = baseName
flags = '-DMACHINE_FILENAME=' + baseName
print('Building machine ' + displayName)
env['PLATFORMIO_BUILD_FLAGS'] = flags
if verbose:
app = subprocess.Popen(cmd, env=env)
else:
app = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, bufsize=1)
for line in app.stdout:
line = line.decode('utf8')
if "Took" in line or 'Uploading' in line or ("error" in line.lower() and "Compiling" not in line):
print(line, end='')
app.wait()
print()
return app.returncode
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/dhxiaotu/esp32_-grbl_-write.git
git@gitee.com:dhxiaotu/esp32_-grbl_-write.git
dhxiaotu
esp32_-grbl_-write
ESP32_GRBL_WRITE
master

搜索帮助