Skip to content

Commit

Permalink
ci auto translate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luatos_bot committed Apr 19, 2024
1 parent c0df6b6 commit 55df4b2
Show file tree
Hide file tree
Showing 53 changed files with 454 additions and 308 deletions.
2 changes: 1 addition & 1 deletion docs/_static/luatos-emulator/vs/snippet.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions docs/api/audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -1027,8 +1027,8 @@ <h2>audio.play(id, path, errStop)<a class="headerlink" href="#audio-play-id-path
</tbody>
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">audio</span><span class="p">.</span><span class="n">play</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s2">"xxxxxx"</span><span class="p">)</span> <span class="c1">--Start playing a file</span>
<span class="n">audio</span><span class="p">.</span><span class="n">play</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="c1">--Stop playing a file</span>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">audio</span><span class="p">.</span><span class="n">play</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="s2">"xxxxxx"</span><span class="p">)</span> <span class="c1">--Start playing a file</span>
<span class="n">audio</span><span class="p">.</span><span class="n">play</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="c1">--Stop playing a file</span>
</pre></div>
</div>
</section>
Expand Down Expand Up @@ -1220,8 +1220,8 @@ <h2>audio.config(id, paPin, onLevel, dacDelay, paDelay, dacPin, dacLevel, dacTim
<p><strong>Return Value</strong></p>
<p>None</p>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">audio</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">pin</span><span class="p">.</span><span class="n">PC0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="c1">--PA The control pin is PC0, the high level is turned on, air105 can be used with this configuration</span>
<span class="n">audio</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">200</span><span class="p">)</span> <span class="c1">--PA The control pin is GPIO25, the high level is turned on, and the Air780E cloud horn board can be used with this configuration.</span>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">audio</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">pin</span><span class="p">.</span><span class="n">PC0</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span> <span class="c1">--PA The control pin is PC0, the high level is turned on, air105 can be used with this configuration</span>
<span class="n">audio</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">25</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">200</span><span class="p">)</span> <span class="c1">--PA The control pin is GPIO25, the high level is turned on, and the Air780E cloud horn board can be used with this configuration.</span>
</pre></div>
</div>
</section>
Expand Down Expand Up @@ -1259,7 +1259,7 @@ <h2>audio.vol(id, value)<a class="headerlink" href="#audio-vol-id-value" title="
</tbody>
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">audio</span><span class="p">.</span><span class="n">vol</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">90</span><span class="p">)</span> <span class="c1">--The volume of channel 0 is adjusted to 90%,result stores the adjusted volume level, which may still be 100</span>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">audio</span><span class="p">.</span><span class="n">vol</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">90</span><span class="p">)</span> <span class="c1">--The volume of channel 0 is adjusted to 90%,result stores the adjusted volume level, which may still be 100</span>
</pre></div>
</div>
</section>
Expand Down Expand Up @@ -1297,7 +1297,7 @@ <h2>audio.micVol(id, value)<a class="headerlink" href="#audio-micvol-id-value" t
</tbody>
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">audio</span><span class="p">.</span><span class="n">vol</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">90</span><span class="p">)</span> <span class="c1">--The volume of channel 0 is adjusted to 90%,result stores the adjusted volume level, which may still be 100</span>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">audio</span><span class="p">.</span><span class="n">vol</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">90</span><span class="p">)</span> <span class="c1">--The volume of channel 0 is adjusted to 90%,result stores the adjusted volume level, which may still be 100</span>
</pre></div>
</div>
</section>
Expand Down Expand Up @@ -1338,8 +1338,8 @@ <h2>audio.setBus(id, bus_type)<a class="headerlink" href="#audio-setbus-id-bus-t
</tbody>
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">audio</span><span class="p">.</span><span class="n">setBus</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">audio</span><span class="p">.</span><span class="n">BUS_SOFT_DAC</span><span class="p">)</span> <span class="c1">--Hardware output channel for channel 0 is set to software DAC</span>
<span class="n">audio</span><span class="p">.</span><span class="n">setBus</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">audio</span><span class="p">.</span><span class="n">BUS_I2S</span><span class="p">)</span> <span class="c1">--The hardware output channel for channel 0 is set I2S</span>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">audio</span><span class="p">.</span><span class="n">setBus</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">audio</span><span class="p">.</span><span class="n">BUS_SOFT_DAC</span><span class="p">)</span> <span class="c1">--Hardware output channel for channel 0 is set to software DAC</span>
<span class="n">audio</span><span class="p">.</span><span class="n">setBus</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">audio</span><span class="p">.</span><span class="n">BUS_I2S</span><span class="p">)</span> <span class="c1">--The hardware output channel for channel 0 is set I2S</span>
</pre></div>
</div>
</section>
Expand Down
8 changes: 4 additions & 4 deletions docs/api/errDump.html
Original file line number Diff line number Diff line change
Expand Up @@ -870,12 +870,12 @@ <h2>errDump.config(enable, period, user_flag, custom_id, host, port)<a class="he
</tbody>
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">3600</span><span class="p">,</span> <span class="s2">"12345678"</span><span class="p">)</span> <span class="c1">--Try the last time in an hour, and it will be attached after imei when uploading.12345678</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">false</span><span class="p">)</span> <span class="c1">--Turn off the recording function and no longer upload it.</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="c1">--Records, but will not take the initiative to upload, by the user to achieve the upload function</span>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">3600</span><span class="p">,</span> <span class="s2">"12345678"</span><span class="p">)</span> <span class="c1">--Try the last time in an hour, and it will be attached after imei when uploading.12345678</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">false</span><span class="p">)</span> <span class="c1">--Turn off the recording function and no longer upload it.</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span> <span class="c1">--Records, but will not take the initiative to upload, by the user to achieve the upload function</span>

<span class="c1">-- 2023.09.22 Added custom_id parameters</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">3600</span><span class="p">,</span> <span class="kc">nil</span><span class="p">,</span> <span class="s2">"ABC"</span><span class="p">)</span> <span class="c1">--Try the last time in an hour, use a custom device ID when uploading ABC</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">3600</span><span class="p">,</span> <span class="kc">nil</span><span class="p">,</span> <span class="s2">"ABC"</span><span class="p">)</span> <span class="c1">--Try the last time in an hour, use a custom device ID when uploading ABC</span>

<span class="c1">-- 2023.12.8 Add host and port parameters</span>
<span class="n">errDump</span><span class="p">.</span><span class="n">config</span><span class="p">(</span><span class="kc">true</span><span class="p">,</span> <span class="mi">3600</span><span class="p">,</span> <span class="kc">nil</span><span class="p">,</span> <span class="kc">nil</span><span class="p">,</span> <span class="s2">"dev_msg1.openluat.com"</span><span class="p">,</span> <span class="mi">12425</span><span class="p">)</span>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/fatfs.html
Original file line number Diff line number Diff line change
Expand Up @@ -810,15 +810,15 @@ <h2>fatfs.mount(mode,mount_point, spiid_or_spidevice, spi_cs, spi_speed, power_p
<span class="kd">local</span> <span class="n">TF_CS</span> <span class="o">=</span> <span class="n">pin</span><span class="p">.</span><span class="n">PB3</span>
<span class="n">gpio</span><span class="p">.</span><span class="n">setup</span><span class="p">(</span><span class="n">TF_CS</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
<span class="c1">--fatfs.debug(1) -- If the mount fails, you can try to open the debugging information to find the reason.</span>
<span class="c1">-- Reminder, if TF/SD module with level conversion, usually does not support baud rate above 10M!!</span>
<span class="c1">-- Reminder, if TF/SD module with level conversion, usually does not support baud rate above 10M!!</span>
<span class="n">fatfs</span><span class="p">.</span><span class="n">mount</span><span class="p">(</span><span class="n">fatfs</span><span class="p">.</span><span class="n">SPI</span><span class="p">,</span><span class="s2">"SD"</span><span class="p">,</span> <span class="n">spiId</span><span class="p">,</span> <span class="n">TF_CS</span><span class="p">,</span> <span class="mi">24000000</span><span class="p">)</span>
<span class="kd">local</span> <span class="n">data</span><span class="p">,</span> <span class="n">err</span> <span class="o">=</span> <span class="n">fatfs</span><span class="p">.</span><span class="n">getfree</span><span class="p">(</span><span class="s2">"SD"</span><span class="p">)</span>
<span class="kr">if</span> <span class="n">data</span> <span class="kr">then</span>
<span class="n">log</span><span class="p">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"fatfs"</span><span class="p">,</span> <span class="s2">"getfree"</span><span class="p">,</span> <span class="n">json</span><span class="p">.</span><span class="n">encode</span><span class="p">(</span><span class="n">data</span><span class="p">))</span>
<span class="kr">else</span>
<span class="n">log</span><span class="p">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"fatfs"</span><span class="p">,</span> <span class="s2">"err"</span><span class="p">,</span> <span class="n">err</span><span class="p">)</span>
<span class="kr">end</span>
<span class="c1">-- For the next operation, use io.open("/sd/xxx", "w") and other io library API</span>
<span class="c1">-- For the next operation, use io.open("/sd/xxx", "w") and other io library API</span>
</pre></div>
</div>
</section>
Expand Down
4 changes: 2 additions & 2 deletions docs/api/fota.html
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@ <h2>fota.init(storge_location, len, param1)<a class="headerlink" href="#fota-ini
</table></div>
<p><strong>Examples</strong></p>
<div class="highlight-lua notranslate"><div class="highlight"><pre><span></span><span class="c1">-- Initialize the fota process</span>
<span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">fota</span><span class="p">.</span><span class="n">init</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mh">0x00300000</span><span class="p">,</span> <span class="n">spi_device</span><span class="p">)</span> <span class="c1">--Since the 105 flash starts at 0x 01000000, 0 is external spiflash</span>
<span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">fota</span><span class="p">.</span><span class="n">init</span><span class="p">()</span> <span class="c1">--ec618 Use a fixed internal address, so no parameters are required.</span>
<span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">fota</span><span class="p">.</span><span class="n">init</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mh">0x00300000</span><span class="p">,</span> <span class="n">spi_device</span><span class="p">)</span> <span class="c1">--Since the 105 flash starts at 0x 01000000, 0 is external spiflash</span>
<span class="kd">local</span> <span class="n">result</span> <span class="o">=</span> <span class="n">fota</span><span class="p">.</span><span class="n">init</span><span class="p">()</span> <span class="c1">--ec618 Use a fixed internal address, so no parameters are required.</span>
</pre></div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ftp.html
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ <h2>ftp.command(cmd)<a class="headerlink" href="#ftp-command-cmd" title="Permali
<span class="nb">print</span><span class="p">(</span><span class="n">ftp</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s2">"CWD /QWER"</span><span class="p">).</span><span class="n">wait</span><span class="p">())</span>
<span class="nb">print</span><span class="p">(</span><span class="n">ftp</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s2">"CDUP"</span><span class="p">).</span><span class="n">wait</span><span class="p">())</span>
<span class="nb">print</span><span class="p">(</span><span class="n">ftp</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s2">"RMD QWER"</span><span class="p">).</span><span class="n">wait</span><span class="p">())</span>
<span class="nb">print</span><span class="p">(</span><span class="n">ftp</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s2">"DELE /1/12222.txt"</span><span class="p">).</span><span class="n">wait</span><span class="p">())</span>
<span class="nb">print</span><span class="p">(</span><span class="n">ftp</span><span class="p">.</span><span class="n">command</span><span class="p">(</span><span class="s2">"DELE /1/12222.txt"</span><span class="p">).</span><span class="n">wait</span><span class="p">())</span>
</pre></div>
</div>
</section>
Expand Down
6 changes: 3 additions & 3 deletions docs/api/http.html
Original file line number Diff line number Diff line change
Expand Up @@ -745,9 +745,9 @@ <h1>http - http Client<a class="headerlink" href="#http-http-client" title="Perm
<span class="nb">require</span> <span class="s2">"sysplus"</span>

<span class="n">sys</span><span class="p">.</span><span class="n">taskInit</span><span class="p">(</span><span class="kr">function</span><span class="p">()</span>
<span class="n">sys</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="mi">1000</span><span class="p">)</span>
<span class="kd">local</span> <span class="n">code</span><span class="p">,</span><span class="n">headers</span><span class="p">,</span><span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="p">.</span><span class="n">request</span><span class="p">(</span><span class="s2">"GET"</span><span class="p">,</span> <span class="s2">"http://www.example.com/abc"</span><span class="p">).</span><span class="n">wait</span><span class="p">()</span>
<span class="n">log</span><span class="p">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"http"</span><span class="p">,</span> <span class="n">code</span><span class="p">,</span> <span class="n">body</span><span class="p">)</span>
<span class="n">sys</span><span class="p">.</span><span class="n">wait</span><span class="p">(</span><span class="mi">1000</span><span class="p">)</span>
<span class="kd">local</span> <span class="n">code</span><span class="p">,</span><span class="n">headers</span><span class="p">,</span><span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="p">.</span><span class="n">request</span><span class="p">(</span><span class="s2">"GET"</span><span class="p">,</span> <span class="s2">"http://www.example.com/abc"</span><span class="p">).</span><span class="n">wait</span><span class="p">()</span>
<span class="n">log</span><span class="p">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"http"</span><span class="p">,</span> <span class="n">code</span><span class="p">,</span> <span class="n">body</span><span class="p">)</span>
<span class="kr">end</span><span class="p">)</span>
</pre></div>
</div>
Expand Down
Loading

0 comments on commit 55df4b2

Please sign in to comment.