Compare commits

..
3 changed files with 8 additions and 5 deletions

No files matched your search

+2 -5
View File
@@ -29,9 +29,6 @@ enum class State : uint8_t {
class Rtttl final : public Component {
public:
// User provided, not "= default": `new(p) Rtttl()` would zero-fill .bss that is already zero.
Rtttl() {}
#ifdef USE_OUTPUT
void set_output(output::FloatOutput *output) { this->output_ = output; }
#endif // USE_OUTPUT
@@ -85,9 +82,9 @@ class Rtttl final : public Component {
/// The duration of the current note in milliseconds.
uint16_t note_duration_{0};
/// The duration of a whole note in milliseconds.
uint16_t wholenote_duration_{0};
uint16_t wholenote_duration_;
/// The time in milliseconds since microcontroller boot when the last note was started.
uint32_t last_note_start_time_{0};
uint32_t last_note_start_time_;
/// The frequency of the current note in Hz.
uint32_t output_freq_{0};
/// The gain of the output.
@@ -3,6 +3,8 @@
namespace esphome::web_server_base {
WebServerBase::WebServerBase() {}
WebServerBase *global_web_server_base = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
void WebServerBase::add_handler(AsyncWebHandler *handler) {
@@ -112,6 +112,10 @@ class AuthMiddlewareHandler : public MiddlewareHandler {
class WebServerBase final {
public:
// User provided, not "= default": `new(p) WebServerBase()` would zero-fill .bss that is already zero.
// Defined out of line so the member constructors are not inlined into every construction site.
WebServerBase();
// The AsyncWebServer is created once and intentionally never deleted: on Arduino
// platforms ESPAsyncWebServer owns its registered handlers, so destroying it would
// also destroy live components (e.g. the captive portal) out from under us.