1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 22:22:22 +01:00

Set ESP32 watchdog to loop task (#2846)

This commit is contained in:
Oxan van Leeuwen
2021-12-01 21:05:42 +01:00
committed by GitHub
parent 607601b3a4
commit 54106179a1
6 changed files with 35 additions and 15 deletions

View File

@@ -5,6 +5,7 @@
#include "esphome/core/defines.h"
#include "esphome/core/preferences.h"
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
#include "esphome/core/helpers.h"
#include "esphome/core/scheduler.h"
@@ -47,6 +48,7 @@ namespace esphome {
class Application {
public:
void pre_setup(const std::string &name, const char *compilation_time, bool name_add_mac_suffix) {
arch_init();
this->name_add_mac_suffix_ = name_add_mac_suffix;
if (name_add_mac_suffix) {
this->name_ = name + "-" + get_mac_address().substr(6);