Skip to content

Commit

Permalink
deploy: 4332a1e
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickelectric committed Mar 4, 2024
1 parent ac10f44 commit cfb7023
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
2 changes: 2 additions & 0 deletions python/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ <h2 id="S">S</h2>
<li><a href="index.html#bluerobotics_navigator.set_led_toggle">set_led_toggle() (in module bluerobotics_navigator)</a>
</li>
<li><a href="index.html#bluerobotics_navigator.set_neopixel">set_neopixel() (in module bluerobotics_navigator)</a>
</li>
<li><a href="index.html#bluerobotics_navigator.set_pwm_channel_duty_cycle">set_pwm_channel_duty_cycle() (in module bluerobotics_navigator)</a>
</li>
</ul></td>
<td style="width: 33%; vertical-align: top;"><ul>
Expand Down
39 changes: 39 additions & 0 deletions python/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<li><a class="reference internal" href="#bluerobotics_navigator.set_led_all"><code class="docutils literal notranslate"><span class="pre">set_led_all()</span></code></a></li>
<li><a class="reference internal" href="#bluerobotics_navigator.set_led_toggle"><code class="docutils literal notranslate"><span class="pre">set_led_toggle()</span></code></a></li>
<li><a class="reference internal" href="#bluerobotics_navigator.set_neopixel"><code class="docutils literal notranslate"><span class="pre">set_neopixel()</span></code></a></li>
<li><a class="reference internal" href="#bluerobotics_navigator.set_pwm_channel_duty_cycle"><code class="docutils literal notranslate"><span class="pre">set_pwm_channel_duty_cycle()</span></code></a></li>
<li><a class="reference internal" href="#bluerobotics_navigator.set_pwm_channel_value"><code class="docutils literal notranslate"><span class="pre">set_pwm_channel_value()</span></code></a></li>
<li><a class="reference internal" href="#bluerobotics_navigator.set_pwm_channels_value"><code class="docutils literal notranslate"><span class="pre">set_pwm_channels_value()</span></code></a></li>
<li><a class="reference internal" href="#bluerobotics_navigator.set_pwm_channels_values"><code class="docutils literal notranslate"><span class="pre">set_pwm_channels_values()</span></code></a></li>
Expand Down Expand Up @@ -685,6 +686,44 @@ <h1>BlueRobotics’s Navigator Library<a class="headerlink" href="#bluerobotics-
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="bluerobotics_navigator.set_pwm_channel_duty_cycle">
<span class="sig-prename descclassname"><span class="pre">bluerobotics_navigator.</span></span><span class="sig-name descname"><span class="pre">set_pwm_channel_duty_cycle</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">channel</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">duty_cycle</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#bluerobotics_navigator.set_pwm_channel_duty_cycle" title="Link to this definition"></a></dt>
<dd><p>Sets the duty cycle (the proportion of ON time) for the selected PWM channel.</p>
<p>Similar to <a class="reference internal" href="#bluerobotics_navigator.set_pwm_channel_value" title="bluerobotics_navigator.set_pwm_channel_value"><code class="xref py py-func docutils literal notranslate"><span class="pre">set_pwm_channel_value()</span></code></a>, this function calculate the OFF counter
value to match desired PWM channel’s duty_cyle.</p>
<p class="rubric">Notes</p>
<p>A duty cycle of 1.0 or 0.0 acts like a relay.</p>
<p>Details of counters on IC, check <a class="reference internal" href="#bluerobotics_navigator.set_pwm_channel_value" title="bluerobotics_navigator.set_pwm_channel_value"><code class="xref py py-func docutils literal notranslate"><span class="pre">set_pwm_channel_value()</span></code></a>.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>channel</strong> (<a class="reference internal" href="#bluerobotics_navigator.PwmChannel" title="bluerobotics_navigator.PwmChannel"><code class="xref py py-class docutils literal notranslate"><span class="pre">PwmChannel</span></code></a>) – The channel to be selected for PWM.</p></li>
<li><p><strong>duty_cycle</strong> (<em>f32</em>) – Duty cycle count value (0.0 : 1.0).</p></li>
</ul>
</dd>
</dl>
<p class="rubric">Examples</p>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">bluerobotics_navigator</span> <span class="k">as</span> <span class="nn">navigator</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">bluerobotics_navigator</span> <span class="kn">import</span> <span class="n">PwmChannel</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">navigator</span><span class="o">.</span><span class="n">init</span><span class="p">()</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">navigator</span><span class="o">.</span><span class="n">set_pwm_freq_hz</span><span class="p">(</span><span class="mi">1000</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">navigator</span><span class="o">.</span><span class="n">set_pwm_channel_duty_cycle</span><span class="p">(</span><span class="n">PwmChannel</span><span class="o">.</span><span class="n">Ch1</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">)</span>
</pre></div>
</div>
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="n">navigator</span><span class="o">.</span><span class="n">set_pwm_enable</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
</pre></div>
</div>
</dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="bluerobotics_navigator.set_pwm_channel_value">
<span class="sig-prename descclassname"><span class="pre">bluerobotics_navigator.</span></span><span class="sig-name descname"><span class="pre">set_pwm_channel_value</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">channel</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">value</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#bluerobotics_navigator.set_pwm_channel_value" title="Link to this definition"></a></dt>
Expand Down
Binary file modified python/objects.inv
Binary file not shown.
Loading

0 comments on commit cfb7023

Please sign in to comment.