mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 07:58:09 +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 {
|
namespace ebyte_lora {
|
||||||
|
|
||||||
void IRAM_ATTR HOT EbyteAuxStore::gpio_intr(EbyteAuxStore *arg) {
|
void IRAM_ATTR HOT EbyteAuxStore::gpio_intr(EbyteAuxStore *arg) {
|
||||||
const bool can_send_ = arg->pin.digital_read();
|
const bool can_send = arg->pin.digital_read();
|
||||||
if (can_send_ == arg->can_send)
|
if (can_send == arg->can_send)
|
||||||
return;
|
return;
|
||||||
arg->can_send = can_send_;
|
arg->can_send = can_send;
|
||||||
const uint32_t now = micros();
|
const uint32_t now = micros();
|
||||||
|
|
||||||
if (!can_send_)
|
if (!can_send)
|
||||||
arg->on_time += now - arg->last_interrupt;
|
arg->on_time += now - arg->last_interrupt;
|
||||||
|
|
||||||
arg->last_interrupt = now;
|
arg->last_interrupt = now;
|
||||||
|
|
Loading…
Reference in a new issue