mirror of
https://github.com/esphome/esphome.git
synced 2024-11-28 01:34:18 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
9810945857
commit
37236f6d01
1 changed files with 4 additions and 4 deletions
|
@ -3,13 +3,13 @@ namespace esphome {
|
|||
namespace ebyte_lora {
|
||||
|
||||
void IRAM_ATTR HOT EbyteAuxStore::gpio_intr(EbyteAuxStore *arg) {
|
||||
const bool can_send_ = arg->pin.digital_read();
|
||||
if (can_send_ == arg->can_send)
|
||||
const bool can_send = arg->pin.digital_read();
|
||||
if (can_send == arg->can_send)
|
||||
return;
|
||||
arg->can_send = can_send_;
|
||||
arg->can_send = can_send;
|
||||
const uint32_t now = micros();
|
||||
|
||||
if (!can_send_)
|
||||
if (!can_send)
|
||||
arg->on_time += now - arg->last_interrupt;
|
||||
|
||||
arg->last_interrupt = now;
|
||||
|
|
Loading…
Reference in a new issue