mirror of
https://github.com/esphome/esphome.git
synced 2024-11-23 23:48:11 +01:00
Update ebyte_lora_component.cpp
This commit is contained in:
parent
95b5962cca
commit
ef1b803e4b
1 changed files with 10 additions and 10 deletions
|
@ -294,10 +294,10 @@ void EbyteLoraComponent::setup() {
|
|||
this->pin_aux_->setup();
|
||||
this->pin_m0_->setup();
|
||||
this->pin_m0_->pin_mode(gpio::FLAG_OUTPUT);
|
||||
this->pin_m0_->digital_write(HIGH);
|
||||
this->pin_m0_->digital_write(true);
|
||||
this->pin_m1_->setup();
|
||||
this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT);
|
||||
this->pin_m1_->digital_write(HIGH);
|
||||
this->pin_m1_->digital_write(true);
|
||||
delay(20);
|
||||
set_mode_(NORMAL);
|
||||
ESP_LOGD(TAG, "Setup success");
|
||||
|
@ -346,23 +346,23 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
|||
delay(5);
|
||||
switch (mode) {
|
||||
case NORMAL:
|
||||
this->pin_m0_->digital_write(LOW);
|
||||
this->pin_m1_->digital_write(LOW);
|
||||
this->pin_m0_->digital_write(false);
|
||||
this->pin_m1_->digital_write(false);
|
||||
ESP_LOGD(TAG, "MODE NORMAL!");
|
||||
break;
|
||||
case WOR_SEND:
|
||||
this->pin_m0_->digital_write(HIGH);
|
||||
this->pin_m1_->digital_write(LOW);
|
||||
this->pin_m0_->digital_write(true);
|
||||
this->pin_m1_->digital_write(false);
|
||||
ESP_LOGD(TAG, "MODE WOR SEND!");
|
||||
break;
|
||||
case WOR_RECEIVER:
|
||||
this->pin_m0_->digital_write(LOW);
|
||||
this->pin_m1_->digital_write(HIGH);
|
||||
this->pin_m0_->digital_write(false);
|
||||
this->pin_m1_->digital_write(true);
|
||||
ESP_LOGD(TAG, "MODE RECEIVING!");
|
||||
break;
|
||||
case CONFIGURATION:
|
||||
this->pin_m0_->digital_write(HIGH);
|
||||
this->pin_m1_->digital_write(HIGH);
|
||||
this->pin_m0_->digital_write(true);
|
||||
this->pin_m1_->digital_write(true);
|
||||
ESP_LOGD(TAG, "MODE SLEEP and CONFIG!");
|
||||
break;
|
||||
case MODE_INIT:
|
||||
|
|
Loading…
Reference in a new issue