mirror of
https://github.com/esphome/esphome.git
synced 2024-11-24 16:08:10 +01:00
Update lora.cpp
This commit is contained in:
parent
b1c1eac7f6
commit
49aed48728
1 changed files with 4 additions and 2 deletions
|
@ -53,10 +53,11 @@ void Lora::setup() {
|
|||
}
|
||||
|
||||
ModeType Lora::get_mode_() {
|
||||
ModeType internalMode = MODE_INIT;
|
||||
if (!Lora::can_send_message_()) {
|
||||
return MODE_INIT;
|
||||
return internalMode;
|
||||
}
|
||||
ModeType internalMode;
|
||||
|
||||
bool pin1 = this->pin_m0_->digital_read();
|
||||
bool pin2 = this->pin_m1_->digital_read();
|
||||
if (!pin1 && !pin2) {
|
||||
|
@ -76,6 +77,7 @@ ModeType Lora::get_mode_() {
|
|||
this->mode_);
|
||||
set_mode_(internalMode);
|
||||
}
|
||||
return internalMode;
|
||||
}
|
||||
void Lora::set_mode_(ModeType mode) {
|
||||
if (!Lora::can_send_message_()) {
|
||||
|
|
Loading…
Reference in a new issue