1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-08 03:40:28 +01:00

change name dfu -> dfu_mode

This commit is contained in:
Tomasz Duda 2024-05-16 19:29:18 +02:00
parent c100f86837
commit 16f3c6a09a
10 changed files with 39 additions and 11 deletions

View File

@ -7,8 +7,8 @@ from esphome.const import (
from esphome.components.zephyr import zephyr_add_prj_conf from esphome.components.zephyr import zephyr_add_prj_conf
dfu_ns = cg.esphome_ns.namespace("dfu") dfu_mode_ns = cg.esphome_ns.namespace("dfu_mode")
DeviceFirmwareUpdate = dfu_ns.class_("DeviceFirmwareUpdate", cg.Component) DeviceFirmwareUpdate = dfu_mode_ns.class_("DeviceFirmwareUpdate", cg.Component)
CONF_RESET_OUTPUT = "reset_output" CONF_RESET_OUTPUT = "reset_output"

View File

@ -5,7 +5,7 @@
#include <zephyr/drivers/uart/cdc_acm.h> #include <zephyr/drivers/uart/cdc_acm.h>
namespace esphome { namespace esphome {
namespace dfu { namespace dfu_mode {
volatile bool goto_dfu = false; volatile bool goto_dfu = false;
@ -37,6 +37,6 @@ void DeviceFirmwareUpdate::loop() {
} }
} }
} // namespace dfu } // namespace dfu_mode
} // namespace esphome } // namespace esphome
#endif #endif

View File

@ -7,7 +7,7 @@
#endif #endif
namespace esphome { namespace esphome {
namespace dfu { namespace dfu_mode {
class DeviceFirmwareUpdate : public Component { class DeviceFirmwareUpdate : public Component {
public: public:
void setup() override; void setup() override;
@ -20,6 +20,6 @@ class DeviceFirmwareUpdate : public Component {
output::BinaryOutput *reset_output_; output::BinaryOutput *reset_output_;
#endif #endif
}; };
} // namespace dfu } // namespace dfu_mode
} // namespace esphome } // namespace esphome
#endif #endif

View File

@ -6,7 +6,13 @@ from esphome.core import CORE, coroutine_with_priority
from esphome.const import CONF_ESPHOME, CONF_OTA, CONF_PLATFORM, CONF_TRIGGER_ID from esphome.const import CONF_ESPHOME, CONF_OTA, CONF_PLATFORM, CONF_TRIGGER_ID
CODEOWNERS = ["@esphome/core"] CODEOWNERS = ["@esphome/core"]
AUTO_LOAD = ["md5"]
def AUTO_LOAD():
if CORE.is_nrf52:
return []
return ["md5"]
IS_PLATFORM_COMPONENT = True IS_PLATFORM_COMPONENT = True

View File

@ -0,0 +1,11 @@
esphome:
on_boot:
then:
- deep_sleep.prevent
- delay: 1s
- deep_sleep.allow
deep_sleep:
run_duration:
default: 10s
sleep_duration: 50s

View File

@ -0,0 +1,11 @@
esphome:
on_boot:
then:
- deep_sleep.prevent
- delay: 1s
- deep_sleep.allow
deep_sleep:
run_duration:
default: 10s
sleep_duration: 50s

View File

@ -7,5 +7,5 @@ output:
output: true output: true
id: rest_gpio id: rest_gpio
dfu: dfu_mode:
reset_output: rest_gpio reset_output: rest_gpio

View File

@ -7,5 +7,5 @@ output:
output: true output: true
id: rest_gpio id: rest_gpio
dfu: dfu_mode:
reset_output: rest_gpio reset_output: rest_gpio

View File

@ -40,7 +40,7 @@ output:
output: true output: true
id: rest_gpio id: rest_gpio
dfu: dfu_mode:
reset_output: rest_gpio reset_output: rest_gpio
ota: ota:

View File

@ -33,7 +33,7 @@ output:
output: true output: true
id: rest_gpio id: rest_gpio
dfu: dfu_mode:
reset_output: rest_gpio reset_output: rest_gpio
zephyr_ble_server: zephyr_ble_server: