Deploying to gh-pages from @ Klipper3d/klipper@d17ef95a3c 🚀
No files matched your search
@@ -5037,11 +5037,12 @@ cs_pin:
|
||||
</code></pre></div>
|
||||
|
||||
<h3 id="mpu9250">[mpu9250]<a class="headerlink" href="#mpu9250" title="Permanent link">¶</a></h3>
|
||||
<p>Support for mpu9250 and mpu6050 accelerometers (one may define any
|
||||
number of sections with an "mpu9250" prefix).</p>
|
||||
<p>Support for MPU-9250, MPU-9255, MPU-9255, MPU-6050, and MPU-6500
|
||||
accelerometers (one may define any number of sections with an
|
||||
"mpu9250" prefix).</p>
|
||||
<div class="highlight"><pre><span></span><code>[mpu9250 my_accelerometer]
|
||||
#i2c_address:
|
||||
# Default is 104 (0x68).
|
||||
# Default is 104 (0x68). If AD0 is high, it would be 0x69 instead.
|
||||
#i2c_mcu:
|
||||
#i2c_bus:
|
||||
#i2c_speed: 400000
|
||||
|
||||
@@ -713,6 +713,52 @@
|
||||
Wiring
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Wiring">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#spi-accelerometers" class="md-nav__link">
|
||||
SPI Accelerometers
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="SPI Accelerometers">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#adxl345" class="md-nav__link">
|
||||
ADXL345
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#i2c-accelerometers" class="md-nav__link">
|
||||
I2C Accelerometers
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="I2C Accelerometers">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#mpu-9250mpu-9255mpu-6515mpu-6050mpu-6500" class="md-nav__link">
|
||||
MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -727,6 +773,33 @@
|
||||
Software installation
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Software installation">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#configure-adxl345-with-rpi" class="md-nav__link">
|
||||
Configure ADXL345 With RPi
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#configure-mpu-60009000-series-with-rpi" class="md-nav__link">
|
||||
Configure MPU-6000/9000 series With RPi
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#configure-mpu-60009000-series-with-pico" class="md-nav__link">
|
||||
Configure MPU-6000/9000 series With PICO
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1385,6 +1458,52 @@
|
||||
Wiring
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Wiring">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#spi-accelerometers" class="md-nav__link">
|
||||
SPI Accelerometers
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="SPI Accelerometers">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#adxl345" class="md-nav__link">
|
||||
ADXL345
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#i2c-accelerometers" class="md-nav__link">
|
||||
I2C Accelerometers
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="I2C Accelerometers">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#mpu-9250mpu-9255mpu-6515mpu-6050mpu-6500" class="md-nav__link">
|
||||
MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
@@ -1399,6 +1518,33 @@
|
||||
Software installation
|
||||
</a>
|
||||
|
||||
<nav class="md-nav" aria-label="Software installation">
|
||||
<ul class="md-nav__list">
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#configure-adxl345-with-rpi" class="md-nav__link">
|
||||
Configure ADXL345 With RPi
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#configure-mpu-60009000-series-with-rpi" class="md-nav__link">
|
||||
Configure MPU-6000/9000 series With RPi
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
<li class="md-nav__item">
|
||||
<a href="#configure-mpu-60009000-series-with-pico" class="md-nav__link">
|
||||
Configure MPU-6000/9000 series With PICO
|
||||
</a>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
@@ -1519,6 +1665,22 @@ pulling SDO to GND), and, if it is going to be connected to a 5V printer MCU,
|
||||
that it has a voltage regulator and a level shifter.</p>
|
||||
<h2 id="installation-instructions">Installation instructions<a class="headerlink" href="#installation-instructions" title="Permanent link">¶</a></h2>
|
||||
<h3 id="wiring">Wiring<a class="headerlink" href="#wiring" title="Permanent link">¶</a></h3>
|
||||
<p>An ethernet cable with shielded twisted pairs (cat5e or better) is recommended
|
||||
for signal integrety over a long distance. If you still experience signal integrity
|
||||
issues (SPI/I2C errors), shorten the cable.</p>
|
||||
<p>Connect ethernet cable shielding to the controller board/RPI ground.</p>
|
||||
<p><strong><em>Double-check your wiring before powering up to prevent
|
||||
damaging your MCU/Raspberry Pi or the accelerometer.</em></strong></p>
|
||||
<h4 id="spi-accelerometers">SPI Accelerometers<a class="headerlink" href="#spi-accelerometers" title="Permanent link">¶</a></h4>
|
||||
<p>Suggested twisted pair order:</p>
|
||||
<div class="highlight"><pre><span></span><code>GND+MISO
|
||||
3.3V+MOSI
|
||||
SCLK+CS
|
||||
</code></pre></div>
|
||||
|
||||
<h5 id="adxl345">ADXL345<a class="headerlink" href="#adxl345" title="Permanent link">¶</a></h5>
|
||||
<p><strong>Note: Many MCUs will work with an ADXL345 in SPI mode(eg Pi Pico), wiring and
|
||||
configuration will vary according to your specific board and avaliable pins.</strong></p>
|
||||
<p>You need to connect ADXL345 to your Raspberry Pi via SPI. Note that the I2C
|
||||
connection, which is suggested by ADXL345 documentation, has too low throughput
|
||||
and <strong>will not work</strong>. The recommended connection scheme:</p>
|
||||
@@ -1563,9 +1725,19 @@ and <strong>will not work</strong>. The recommended connection scheme:</p>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>An alternative to the ADXL345 is the MPU-9250 (or MPU-6050). This
|
||||
accelerometer has been tested to work over I2C on the RPi at 400kbaud.
|
||||
Recommended connection scheme for I2C:</p>
|
||||
<p>Fritzing wiring diagrams for some of the ADXL345 boards:</p>
|
||||
<p><img alt="ADXL345-Rpi" src="img/adxl345-fritzing.png" /></p>
|
||||
<h4 id="i2c-accelerometers">I2C Accelerometers<a class="headerlink" href="#i2c-accelerometers" title="Permanent link">¶</a></h4>
|
||||
<p>Suggested twisted pair order:</p>
|
||||
<div class="highlight"><pre><span></span><code>3.3V+SDA
|
||||
GND+SCL
|
||||
</code></pre></div>
|
||||
|
||||
<h5 id="mpu-9250mpu-9255mpu-6515mpu-6050mpu-6500">MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500<a class="headerlink" href="#mpu-9250mpu-9255mpu-6515mpu-6050mpu-6500" title="Permanent link">¶</a></h5>
|
||||
<p>Alternatives to the ADXL345 are MPU-9250/MPU-9255/MPU-6515/MPU-6050/MPU-6500.
|
||||
These accelerometers have been tested to work over I2C on the RPi or RP2040(pico)
|
||||
at 400kbaud.</p>
|
||||
<p>Recommended connection scheme for I2C on the Raspberry Pi:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -1576,7 +1748,7 @@ Recommended connection scheme for I2C:</p>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center">3V3 (or VCC)</td>
|
||||
<td align="center">VCC</td>
|
||||
<td align="center">01</td>
|
||||
<td align="center">3.3v DC power</td>
|
||||
</tr>
|
||||
@@ -1597,10 +1769,40 @@ Recommended connection scheme for I2C:</p>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>Fritzing wiring diagrams for some of the ADXL345 boards:</p>
|
||||
<p><img alt="ADXL345-Rpi" src="img/adxl345-fritzing.png" /></p>
|
||||
<p>Double-check your wiring before powering up the Raspberry Pi to prevent
|
||||
damaging it or the accelerometer.</p>
|
||||
<p><img alt="MPU-9250 connected to RPI" src="img/mpu9250-PI-fritzing.png" /></p>
|
||||
<p>Recommended connection scheme for I2C(i2c0a) on the RP2040:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th align="center">MPU-9250 pin</th>
|
||||
<th align="center">RP2040 pin</th>
|
||||
<th align="center">RPi pin name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center">VCC</td>
|
||||
<td align="center">39</td>
|
||||
<td align="center">3v3</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">GND</td>
|
||||
<td align="center">38</td>
|
||||
<td align="center">Ground</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">SDA</td>
|
||||
<td align="center">01</td>
|
||||
<td align="center">GP0 (I2C0 SDA)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center">SCL</td>
|
||||
<td align="center">02</td>
|
||||
<td align="center">GP1 (I2C0 SCL)</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p><img alt="MPU-9250 connected to PICO" src="img/mpu9250-PICO-fritzing.png" /></p>
|
||||
<h3 id="mounting-the-accelerometer">Mounting the accelerometer<a class="headerlink" href="#mounting-the-accelerometer" title="Permanent link">¶</a></h3>
|
||||
<p>The accelerometer must be attached to the toolhead. One needs to design a proper
|
||||
mount that fits their own 3D printer. It is better to align the axes of the
|
||||
@@ -1636,9 +1838,10 @@ the installation may fail and you will need to enable swap.</p>
|
||||
<p>Afterwards, check and follow the instructions in the
|
||||
<a href="RPi_microcontroller.html">RPi Microcontroller document</a> to setup the
|
||||
"linux mcu" on the Raspberry Pi.</p>
|
||||
<h4 id="configure-adxl345-with-rpi">Configure ADXL345 With RPi<a class="headerlink" href="#configure-adxl345-with-rpi" title="Permanent link">¶</a></h4>
|
||||
<p>Make sure the Linux SPI driver is enabled by running <code>sudo
|
||||
raspi-config</code> and enabling SPI under the "Interfacing options" menu.</p>
|
||||
<p>For the ADXL345, add the following to the printer.cfg file:</p>
|
||||
<p>Add the following to the printer.cfg file:</p>
|
||||
<div class="highlight"><pre><span></span><code>[mcu rpi]
|
||||
serial: /tmp/klipper_host_mcu
|
||||
|
||||
@@ -1653,7 +1856,8 @@ probe_points:
|
||||
|
||||
<p>It is advised to start with 1 probe point, in the middle of the print bed,
|
||||
slightly above it.</p>
|
||||
<p>For the MPU-9250, make sure the Linux I2C driver is enabled and the baud rate is
|
||||
<h4 id="configure-mpu-60009000-series-with-rpi">Configure MPU-6000/9000 series With RPi<a class="headerlink" href="#configure-mpu-60009000-series-with-rpi" title="Permanent link">¶</a></h4>
|
||||
<p>Make sure the Linux I2C driver is enabled and the baud rate is
|
||||
set to 400000 (see <a href="RPi_microcontroller.html#optional-enabling-i2c">Enabling I2C</a>
|
||||
section for more details). Then, add the following to the printer.cfg:</p>
|
||||
<div class="highlight"><pre><span></span><code>[mcu rpi]
|
||||
@@ -1669,6 +1873,25 @@ probe_points:
|
||||
100, 100, 20 # an example
|
||||
</code></pre></div>
|
||||
|
||||
<h4 id="configure-mpu-60009000-series-with-pico">Configure MPU-6000/9000 series With PICO<a class="headerlink" href="#configure-mpu-60009000-series-with-pico" title="Permanent link">¶</a></h4>
|
||||
<p>PICO I2C is set to 400000 on default. Simply add the following to the
|
||||
printer.cfg:</p>
|
||||
<div class="highlight"><pre><span></span><code>[mcu pico]
|
||||
serial: /dev/serial/by-id/<your PICO's serial ID>
|
||||
|
||||
[mpu9250]
|
||||
i2c_mcu: pico
|
||||
i2c_bus: i2c1a
|
||||
|
||||
[resonance_tester]
|
||||
accel_chip: mpu9250
|
||||
probe_points:
|
||||
100, 100, 20 # an example
|
||||
|
||||
[static_digital_output pico_3V3pwm] # Improve power stability
|
||||
pin: pico:gpio23
|
||||
</code></pre></div>
|
||||
|
||||
<p>Restart Klipper via the <code>RESTART</code> command.</p>
|
||||
<h2 id="measuring-the-resonances">Measuring the resonances<a class="headerlink" href="#measuring-the-resonances" title="Permanent link">¶</a></h2>
|
||||
<h3 id="checking-the-setup">Checking the setup<a class="headerlink" href="#checking-the-setup" title="Permanent link">¶</a></h3>
|
||||
@@ -1690,6 +1913,8 @@ free-fall acceleration, e.g.</p>
|
||||
is some other ID, it is indicative of the connection problem with ADXL345,
|
||||
or the faulty sensor. Double-check the power, the wiring (that it matches
|
||||
the schematics, no wire is broken or loose, etc.), and soldering quality.</p>
|
||||
<p><strong>If you are using MPU-6000/9000 series accelerometer and it show up as <code>mpu-unknown</code>, use with
|
||||
caution! They are probably refurbished chips!</strong></p>
|
||||
<p>Next, try running <code>MEASURE_AXES_NOISE</code> in Octoprint, you should get some
|
||||
baseline numbers for the noise of accelerometer on the axes (should be
|
||||
somewhere in the range of ~1-100). Too high axes noise (e.g. 1000 and more)
|
||||
|
||||
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 59 KiB |
@@ -1 +1 @@
|
||||
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"Klipper is a 3d-Printer firmware. It combines the power of a general purpose computer with one or more micro-controllers. See the features document for more information on why you should use Klipper. To begin using Klipper start by installing it. Klipper is Free Software. Read the documentation or view the Klipper code on github . We depend on the generous support from our sponsors .","title":"Welcome"},{"location":"API_Server.html","text":"API server \u00b6 This document describes Klipper's Application Programmer Interface (API). This interface enables external applications to query and control the Klipper host software. Enabling the API socket \u00b6 In order to use the API server, the klippy.py host software must be started with the -a parameter. For example: ~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log This causes the host software to create a Unix Domain Socket. A client can then open a connection on that socket and send commands to Klipper. See the Moonraker project for a popular tool that can forward HTTP requests to Klipper's API Server Unix Domain Socket. Request format \u00b6 Messages sent and received on the socket are JSON encoded strings terminated by an ASCII 0x03 character: <json_object_1><0x03><json_object_2><0x03>... Klipper contains a scripts/whconsole.py tool that can perform the above message framing. For example: ~/klipper/scripts/whconsole.py /tmp/klippy_uds This tool can read a series of JSON commands from stdin, send them to Klipper, and report the results. The tool expects each JSON command to be on a single line, and it will automatically append the 0x03 terminator when transmitting a request. (The Klipper API server does not have a newline requirement.) API Protocol \u00b6 The command protocol used on the communication socket is inspired by json-rpc . A request might look like: {\"id\": 123, \"method\": \"info\", \"params\": {}} and a response might look like: {\"id\": 123, \"result\": {\"state_message\": \"Printer is ready\", \"klipper_path\": \"/home/pi/klipper\", \"config_file\": \"/home/pi/printer.cfg\", \"software_version\": \"v0.8.0-823-g883b1cb6\", \"hostname\": \"octopi\", \"cpu_info\": \"4 core ARMv7 Processor rev 4 (v7l)\", \"state\": \"ready\", \"python_path\": \"/home/pi/klippy-env/bin/python\", \"log_file\": \"/tmp/klippy.log\"}} Each request must be a JSON dictionary. (This document uses the Python term \"dictionary\" to describe a \"JSON object\" - a mapping of key/value pairs contained within {} .) The request dictionary must contain a \"method\" parameter that is the string name of an available Klipper \"endpoint\". The request dictionary may contain a \"params\" parameter which must be of a dictionary type. The \"params\" provide additional parameter information to the Klipper \"endpoint\" handling the request. Its content is specific to the \"endpoint\". The request dictionary may contain an \"id\" parameter which may be of any JSON type. If \"id\" is present then Klipper will respond to the request with a response message containing that \"id\". If \"id\" is omitted (or set to a JSON \"null\" value) then Klipper will not provide any response to the request. A response message is a JSON dictionary containing \"id\" and \"result\". The \"result\" is always a dictionary - its contents are specific to the \"endpoint\" handling the request. If the processing of a request results in an error, then the response message will contain an \"error\" field instead of a \"result\" field. For example, the request: {\"id\": 123, \"method\": \"gcode/script\", \"params\": {\"script\": \"G1 X200\"}} might result in an error response such as: {\"id\": 123, \"error\": {\"message\": \"Must home axis first: 200.000 0.000 0.000 [0.000]\", \"error\": \"WebRequestError\"}} Klipper will always start processing requests in the order that they are received. However, some request may not complete immediately, which could cause the associated response to be sent out of order with respect to responses from other requests. A JSON request will never pause the processing of future JSON requests. Subscriptions \u00b6 Some Klipper \"endpoint\" requests allow one to \"subscribe\" to future asynchronous update messages. For example: {\"id\": 123, \"method\": \"gcode/subscribe_output\", \"params\": {\"response_template\":{\"key\": 345}}} may initially respond with: {\"id\": 123, \"result\": {}} and cause Klipper to send future messages similar to: {\"params\": {\"response\": \"ok B:22.8 /0.0 T0:22.4 /0.0\"}, \"key\": 345} A subscription request accepts a \"response_template\" dictionary in the \"params\" field of the request. That \"response_template\" dictionary is used as a template for future asynchronous messages - it may contain arbitrary key/value pairs. When sending these future asyncLine truncated
|
||||
{"config":{"indexing":"full","lang":["en"],"min_search_length":3,"prebuild_index":false,"separator":"[\\s\\-]+"},"docs":[{"location":"index.html","text":"Klipper is a 3d-Printer firmware. It combines the power of a general purpose computer with one or more micro-controllers. See the features document for more information on why you should use Klipper. To begin using Klipper start by installing it. Klipper is Free Software. Read the documentation or view the Klipper code on github . We depend on the generous support from our sponsors .","title":"Welcome"},{"location":"API_Server.html","text":"API server \u00b6 This document describes Klipper's Application Programmer Interface (API). This interface enables external applications to query and control the Klipper host software. Enabling the API socket \u00b6 In order to use the API server, the klippy.py host software must be started with the -a parameter. For example: ~/klippy-env/bin/python ~/klipper/klippy/klippy.py ~/printer.cfg -a /tmp/klippy_uds -l /tmp/klippy.log This causes the host software to create a Unix Domain Socket. A client can then open a connection on that socket and send commands to Klipper. See the Moonraker project for a popular tool that can forward HTTP requests to Klipper's API Server Unix Domain Socket. Request format \u00b6 Messages sent and received on the socket are JSON encoded strings terminated by an ASCII 0x03 character: <json_object_1><0x03><json_object_2><0x03>... Klipper contains a scripts/whconsole.py tool that can perform the above message framing. For example: ~/klipper/scripts/whconsole.py /tmp/klippy_uds This tool can read a series of JSON commands from stdin, send them to Klipper, and report the results. The tool expects each JSON command to be on a single line, and it will automatically append the 0x03 terminator when transmitting a request. (The Klipper API server does not have a newline requirement.) API Protocol \u00b6 The command protocol used on the communication socket is inspired by json-rpc . A request might look like: {\"id\": 123, \"method\": \"info\", \"params\": {}} and a response might look like: {\"id\": 123, \"result\": {\"state_message\": \"Printer is ready\", \"klipper_path\": \"/home/pi/klipper\", \"config_file\": \"/home/pi/printer.cfg\", \"software_version\": \"v0.8.0-823-g883b1cb6\", \"hostname\": \"octopi\", \"cpu_info\": \"4 core ARMv7 Processor rev 4 (v7l)\", \"state\": \"ready\", \"python_path\": \"/home/pi/klippy-env/bin/python\", \"log_file\": \"/tmp/klippy.log\"}} Each request must be a JSON dictionary. (This document uses the Python term \"dictionary\" to describe a \"JSON object\" - a mapping of key/value pairs contained within {} .) The request dictionary must contain a \"method\" parameter that is the string name of an available Klipper \"endpoint\". The request dictionary may contain a \"params\" parameter which must be of a dictionary type. The \"params\" provide additional parameter information to the Klipper \"endpoint\" handling the request. Its content is specific to the \"endpoint\". The request dictionary may contain an \"id\" parameter which may be of any JSON type. If \"id\" is present then Klipper will respond to the request with a response message containing that \"id\". If \"id\" is omitted (or set to a JSON \"null\" value) then Klipper will not provide any response to the request. A response message is a JSON dictionary containing \"id\" and \"result\". The \"result\" is always a dictionary - its contents are specific to the \"endpoint\" handling the request. If the processing of a request results in an error, then the response message will contain an \"error\" field instead of a \"result\" field. For example, the request: {\"id\": 123, \"method\": \"gcode/script\", \"params\": {\"script\": \"G1 X200\"}} might result in an error response such as: {\"id\": 123, \"error\": {\"message\": \"Must home axis first: 200.000 0.000 0.000 [0.000]\", \"error\": \"WebRequestError\"}} Klipper will always start processing requests in the order that they are received. However, some request may not complete immediately, which could cause the associated response to be sent out of order with respect to responses from other requests. A JSON request will never pause the processing of future JSON requests. Subscriptions \u00b6 Some Klipper \"endpoint\" requests allow one to \"subscribe\" to future asynchronous update messages. For example: {\"id\": 123, \"method\": \"gcode/subscribe_output\", \"params\": {\"response_template\":{\"key\": 345}}} may initially respond with: {\"id\": 123, \"result\": {}} and cause Klipper to send future messages similar to: {\"params\": {\"response\": \"ok B:22.8 /0.0 T0:22.4 /0.0\"}, \"key\": 345} A subscription request accepts a \"response_template\" dictionary in the \"params\" field of the request. That \"response_template\" dictionary is used as a template for future asynchronous messages - it may contain arbitrary key/value pairs. When sending these future asyncLine truncated
|
||||
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 103 KiB |
|
After Width: | Height: | Size: 59 KiB |