Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions components/button/include/button.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Button {

/// \brief The configuration for the button
struct Config {
std::string_view name{"Button"}; ///< Name of the button
int gpio_num; ///< GPIO number to use for the button
event_callback_fn callback; ///< Callback for the button event
ActiveLevel active_level; ///< Active level of the GPIO
Expand All @@ -65,7 +66,7 @@ class Button {
/// \param config The configuration for the button
explicit Button(const Config &config)
: gpio_num_(config.gpio_num), callback_(config.callback), active_level_(config.active_level),
logger_({.tag = "Button", .level = config.log_level}) {
logger_({.tag = config.name, .level = config.log_level}) {
// make the event queue
event_queue_ = xQueueCreate(10, sizeof(EventData));

Expand Down Expand Up @@ -96,7 +97,7 @@ class Button {

// make the task
task_ = espp::Task::make_unique(
espp::Task::Config{.name = "Button",
espp::Task::Config{.name = config.name,
.callback = std::bind(&Button::task_callback, this,
std::placeholders::_1, std::placeholders::_2),
.stack_size_bytes = config.task_stack_size_bytes,
Expand Down
2 changes: 1 addition & 1 deletion components/task/include/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Task {
Task(const Config &config)
: name_(config.name), callback_(config.callback), stack_size_bytes_(config.stack_size_bytes),
priority_(config.priority), core_id_(config.core_id),
logger_({.tag = config.name, .level = config.log_level}) {}
logger_({.tag = name_, .level = config.log_level}) {}

/**
* @brief Get a unique pointer to a new task created with \p config.
Expand Down
2 changes: 1 addition & 1 deletion components/timer/include/timer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Timer {
.level = config.log_level}) {
// make the task
task_ = espp::Task::make_unique({
.name = std::string(config.name) + "_task",
.name = config.name,
.callback = std::bind(&Timer::timer_callback_fn, this, std::placeholders::_1,
std::placeholders::_2),
.stack_size_bytes = config.stack_size_bytes,
Expand Down
2 changes: 1 addition & 1 deletion docs/adc/adc_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>ADC Types</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/adc/adc_types.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/adc/adc_types.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down
4 changes: 2 additions & 2 deletions docs/adc/ads1x15.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>ADS1x15 I2C ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/adc/ads1x15.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/adc/ads1x15.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -159,7 +159,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/ads1x15/include/ads1x15.hpp">components/ads1x15/include/ads1x15.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/ads1x15/include/ads1x15.hpp">components/ads1x15/include/ads1x15.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
4 changes: 2 additions & 2 deletions docs/adc/ads7138.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>ADS7138 I2C ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/adc/ads7138.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/adc/ads7138.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -164,7 +164,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/ads7138/include/ads7138.hpp">components/ads7138/include/ads7138.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/ads7138/include/ads7138.hpp">components/ads7138/include/ads7138.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
4 changes: 2 additions & 2 deletions docs/adc/continuous_adc.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>Continuous ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/adc/continuous_adc.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/adc/continuous_adc.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -164,7 +164,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/adc/include/continuous_adc.hpp">components/adc/include/continuous_adc.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/adc/include/continuous_adc.hpp">components/adc/include/continuous_adc.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
2 changes: 1 addition & 1 deletion docs/adc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>ADC APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/adc/index.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/adc/index.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down
4 changes: 2 additions & 2 deletions docs/adc/oneshot_adc.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
<li><a href="index.html">ADC APIs</a> &raquo;</li>
<li>Oneshot ADC</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/adc/oneshot_adc.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/adc/oneshot_adc.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -163,7 +163,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/adc/include/oneshot_adc.hpp">components/adc/include/oneshot_adc.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/adc/include/oneshot_adc.hpp">components/adc/include/oneshot_adc.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
4 changes: 2 additions & 2 deletions docs/bldc/bldc_driver.html
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
<li><a href="index.html">BLDC APIs</a> &raquo;</li>
<li>BLDC Driver</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/bldc/bldc_driver.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/bldc/bldc_driver.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -156,7 +156,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/bldc_driver/include/bldc_driver.hpp">components/bldc_driver/include/bldc_driver.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/bldc_driver/include/bldc_driver.hpp">components/bldc_driver/include/bldc_driver.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
8 changes: 4 additions & 4 deletions docs/bldc/bldc_motor.html
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
<li><a href="index.html">BLDC APIs</a> &raquo;</li>
<li>BLDC Motor</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/bldc/bldc_motor.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/bldc/bldc_motor.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down Expand Up @@ -172,7 +172,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/bldc_motor/include/bldc_motor.hpp">components/bldc_motor/include/bldc_motor.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/bldc_motor/include/bldc_motor.hpp">components/bldc_motor/include/bldc_motor.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down Expand Up @@ -561,13 +561,13 @@ <h4>Example Usage<a class="headerlink" href="#classespp_1_1_bldc_motor_1bldc_mot
<section id="id1">
<h3>Header File<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/bldc_motor/include/bldc_types.hpp">components/bldc_motor/include/bldc_types.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/bldc_motor/include/bldc_types.hpp">components/bldc_motor/include/bldc_types.hpp</a></p></li>
</ul>
</section>
<section id="id2">
<h3>Header File<a class="headerlink" href="#id2" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/bldc_motor/include/sensor_direction.hpp">components/bldc_motor/include/sensor_direction.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/bldc_motor/include/sensor_direction.hpp">components/bldc_motor/include/sensor_direction.hpp</a></p></li>
</ul>
</section>
</section>
Expand Down
2 changes: 1 addition & 1 deletion docs/bldc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>BLDC APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/bldc/index.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/bldc/index.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down
10 changes: 8 additions & 2 deletions docs/button.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Button APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/button.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/button.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -160,7 +160,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/button/include/button.hpp">components/button/include/button.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/button/include/button.hpp">components/button/include/button.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down Expand Up @@ -346,6 +346,12 @@ <h4>Button Example<a class="headerlink" href="#classespp_1_1_button_1button_ex1"
<dd><p>The configuration for the button. </p>
<div class="breathe-sectiondef docutils container">
<p class="breathe-sectiondef-title rubric" id="breathe-section-title-public-members">Public Members</p>
<dl class="cpp var">
<dt class="sig sig-object cpp" id="_CPPv4N4espp6Button6Config4nameE">
<span id="_CPPv3N4espp6Button6Config4nameE"></span><span id="_CPPv2N4espp6Button6Config4nameE"></span><span id="espp::Button::Config::name__std::string_view"></span><span class="target" id="structespp_1_1_button_1_1_config_1a29560e55848d69a8242171a14f2f4260"></span><span class="n"><span class="pre">std</span></span><span class="p"><span class="pre">::</span></span><span class="n"><span class="pre">string_view</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">name</span></span></span><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="p"><span class="pre">{</span></span><span class="s"><span class="pre">&quot;Button&quot;</span></span><span class="p"><span class="pre">}</span></span><a class="headerlink" href="#_CPPv4N4espp6Button6Config4nameE" title="Permalink to this definition"></a><br /></dt>
<dd><p>Name of the button. </p>
</dd></dl>

<dl class="cpp var">
<dt class="sig sig-object cpp" id="_CPPv4N4espp6Button6Config8gpio_numE">
<span id="_CPPv3N4espp6Button6Config8gpio_numE"></span><span id="_CPPv2N4espp6Button6Config8gpio_numE"></span><span id="espp::Button::Config::gpio_num__i"></span><span class="target" id="structespp_1_1_button_1_1_config_1a318a549eea1e94a871e1a1387fed218d"></span><span class="kt"><span class="pre">int</span></span><span class="w"> </span><span class="sig-name descname"><span class="n"><span class="pre">gpio_num</span></span></span><a class="headerlink" href="#_CPPv4N4espp6Button6Config8gpio_numE" title="Permalink to this definition"></a><br /></dt>
Expand Down
6 changes: 3 additions & 3 deletions docs/cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Command Line Interface (CLI) APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/cli.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/cli.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand Down Expand Up @@ -180,7 +180,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/cli/include/cli.hpp">components/cli/include/cli.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/cli/include/cli.hpp">components/cli/include/cli.hpp</a></p></li>
</ul>
</section>
<section id="macros">
Expand Down Expand Up @@ -344,7 +344,7 @@ <h4>Oneshot CLI Example<a class="headerlink" href="#classespp_1_1_cli_1cli_ex1"
<section id="id1">
<h3>Header File<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/cli/include/line_input.hpp">components/cli/include/line_input.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/cli/include/line_input.hpp">components/cli/include/line_input.hpp</a></p></li>
</ul>
</section>
<section id="id2">
Expand Down
4 changes: 2 additions & 2 deletions docs/color.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Color APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/color.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/color.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -157,7 +157,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/color/include/color.hpp">components/color/include/color.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/color/include/color.hpp">components/color/include/color.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
4 changes: 2 additions & 2 deletions docs/controller.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>Controller APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/controller.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/controller.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -155,7 +155,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/controller/include/controller.hpp">components/controller/include/controller.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/controller/include/controller.hpp">components/controller/include/controller.hpp</a></p></li>
</ul>
</section>
<section id="classes">
Expand Down
4 changes: 2 additions & 2 deletions docs/csv.html
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>CSV APIs</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/esp-cpp/espp/blob/453ec29/docs/en/csv.rst" class="fa fa-github"> Edit on GitHub</a>
<a href="https://github.com/esp-cpp/espp/blob/a84c073/docs/en/csv.rst" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
Expand All @@ -155,7 +155,7 @@ <h2>API Reference<a class="headerlink" href="#api-reference" title="Permalink to
<section id="header-file">
<h3>Header File<a class="headerlink" href="#header-file" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/453ec29/components/csv/include/csv.hpp">components/csv/include/csv.hpp</a></p></li>
<li><p><a class="reference external" href="https://github.com/esp-cpp/espp/blob/a84c073/components/csv/include/csv.hpp">components/csv/include/csv.hpp</a></p></li>
</ul>
</section>
<section id="macros">
Expand Down
Loading