Deploying to gh-pages from @ Klipper3d/klipper@0407c24c78 🚀

This commit is contained in:
KevinOConnor 2023-01-28 00:04:00 +00:00
parent eae83321f5
commit 0d82a48075
442 changed files with 141582 additions and 259 deletions

View file

@ -175,6 +175,12 @@
</a>
</li>
<li class="md-select__item">
<a href="/fr/" hreflang="fr" class="md-select__link">
Français
</a>
</li>
</ul>
</div>
</div>
@ -1679,18 +1685,18 @@ gcode:
<h3 id="objectslist">objects/list<a class="headerlink" href="#objectslist" title="Permanent link">&para;</a></h3>
<p>This endpoint queries the list of available printer "objects" that one may query (via the "objects/query" endpoint). For example: <code>{"id": 123, "method": "objects/list"}</code> might return: <code>{"id": 123, "result": {"objects": ["webhooks", "configfile", "heaters", "gcode_move", "query_endstops", "idle_timeout", "toolhead", "extruder"]}}</code></p>
<h3 id="objectsquery">objects/query<a class="headerlink" href="#objectsquery" title="Permanent link">&para;</a></h3>
<p>This endpoint allows one to query information from printer objects. For example: <code>{"id": 123, "method": "objects/query", "params": {"objects": {"toolhead": ["position"], "webhooks": null}}}</code> might return: <code>{"id": 123, "result": {"status": {"webhooks": {"state": "ready", "state_message": "Printer is ready"}, "toolhead": {"position": [0.0, 0.0, 0.0, 0.0]}}, "eventtime": 3051555.377933684}}</code></p>
<p>The "objects" parameter in the request must be a dictionary containing the printer objects that are to be queried - the key contains the printer object name and the value is either "null" (to query all fields) or a list of field names.</p>
<p>The response message will contain a "status" field containing a dictionary with the queried information - the key contains the printer object name and the value is a dictionary containing its fields. The response message will also contain an "eventtime" field containing the timestamp from when the query was taken.</p>
<p>Available fields are documented in the <a href="Status_Reference.html">Status Reference</a> document.</p>
<p>这个endpoint允许从打印机对象中查询信息。比如说<code>{"id": 123, "method": "objects/query", "params": {"objects": {"toolhead": ["position"], "webhooks": null}}}</code> 可能返回。<code>{"id": 123, "result": {"status": {"webhooks": {"state": "ready", "state_message": "Printer is ready"}, "toolhead": {"position": [0.0, 0.0, 0.0, 0.0]}}, "eventtime": 3051555.377933684}}</code></p>
<p>请求中的 "objects "参数必须是一个包含要查询的打印机对象的字典 - 键包含打印机对象名称,值是 "null"(查询所有字段)或一个字段名的列表。</p>
<p>响应消息将包含一个 "status "字段,其中包含一个包含查询信息的字典 - 键包含打印机对象名称,值是一个包含其字段的字典。响应消息还将包含一个 "eventtime "字段,其中包含从查询开始的时间戳。</p>
<p><a href="Status_Reference.html">Status Reference</a> 文档中定义了可用字段。</p>
<h3 id="objectssubscribe">objects/subscribe<a class="headerlink" href="#objectssubscribe" title="Permanent link">&para;</a></h3>
<p>This endpoint allows one to query and then subscribe to information from printer objects. The endpoint request and response is identical to the "objects/query" endpoint. For example: <code>{"id": 123, "method": "objects/subscribe", "params": {"objects":{"toolhead": ["position"], "webhooks": ["state"]}, "response_template":{}}}</code> might return: <code>{"id": 123, "result": {"status": {"webhooks": {"state": "ready"}, "toolhead": {"position": [0.0, 0.0, 0.0, 0.0]}}, "eventtime": 3052153.382083195}}</code> and result in subsequent asynchronous messages such as: <code>{"params": {"status": {"webhooks": {"state": "shutdown"}}, "eventtime": 3052165.418815847}}</code></p>
<p>这个endpoint允许查询然后subscribe打印机对象的信息。端点的请求和响应与 "objects/query" endpoint相同。例如。<code>"id": 123, "method": "objects/subscribe", "params": {"objects":{"toolhead": ["position"], "webhooks": ["state"]}, "response_template":{}}}</code> 可能返回:<code>{"id": 123, "result": {"status": {"webhooks": {"state": "ready"}, "toolhead": {"position": [0.0, 0.0, 0.0, 0.0]}}, "eventtime": 3052153.382083195}}</code> ,并导致随后的异步消息,例如:<code>{"params": {"status": {"webhooks": {"state": "shutdown"}}, "eventtime": 3052165.418815847}}</code></p>
<h3 id="gcodehelp">gcode/help<a class="headerlink" href="#gcodehelp" title="Permanent link">&para;</a></h3>
<p>This endpoint allows one to query available G-Code commands that have a help string defined. For example: <code>{"id": 123, "method": "gcode/help"}</code> might return: <code>{"id": 123, "result": {"RESTORE_GCODE_STATE": "Restore a previously saved G-Code state", "PID_CALIBRATE": "Run PID calibration test", "QUERY_ADC": "Report the last value of an analog pin", ...}}</code></p>
<p>这个endpoint允许查询有定义帮助字符串的可用G-Code命令。例如<code>{"id": 123, "method": "gcode/help"}</code> 可能返回:<code>{"id": 123, "result": {"RESTORE_GCODE_STATE": "Restore a previously saved G-Code state", "PID_CALIBRATE": "Run PID calibration test", "QUERY_ADC": "Report the last value of an analog pin", ...}}</code></p>
<h3 id="gcodescript">gcode/script<a class="headerlink" href="#gcodescript" title="Permanent link">&para;</a></h3>
<p>This endpoint allows one to run a series of G-Code commands. For example: <code>{"id": 123, "method": "gcode/script", "params": {"script": "G90"}}</code></p>
<p>If the provided G-Code script raises an error, then an error response is generated. However, if the G-Code command produces terminal output, that terminal output is not provided in the response. (Use the "gcode/subscribe_output" endpoint to obtain G-Code terminal output.)</p>
<p>If there is a G-Code command being processed when this request is received, then the provided script will be queued. This delay could be significant (eg, if a G-Code wait for temperature command is running). The JSON response message is sent when the processing of the script fully completes.</p>
<p>这个endpoint允许运行一系列的G代码命令。比如说<code>{"id": 123, "method": "gcode/script", "params": {"script": "G90"}}</code></p>
<p>如果提供的G-Code脚本产生了错误那么就会产生一个错误响应。然而如果G-Code命令产生了终端输出则该终端输出不会在响应中提供。(使用 "gcode/subscribe_output " endpoint 来获取G-Code终端输出。</p>
<p>如果在收到这个请求时有一个G-Code命令正在处理那么所提供的脚本将被排队。这个延迟可能很严重例如如果一个G-Code等待温度的命令正在运行。当脚本的处理完全完成时将发送JSON响应信息。</p>
<h3 id="gcoderestart">gcode/restart<a class="headerlink" href="#gcoderestart" title="Permanent link">&para;</a></h3>
<p>This endpoint allows one to request a restart - it is similar to running the G-Code "RESTART" command. For example: <code>{"id": 123, "method": "gcode/restart"}</code></p>
<p>As with the "gcode/script" endpoint, this endpoint only completes after any pending G-Code commands complete.</p>