mirror of
https://github.com/esphome/esphome.git
synced 2024-11-27 17:27:59 +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_aux_->setup();
|
||||||
this->pin_m0_->setup();
|
this->pin_m0_->setup();
|
||||||
this->pin_m0_->pin_mode(gpio::FLAG_OUTPUT);
|
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_->setup();
|
||||||
this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT);
|
this->pin_m1_->pin_mode(gpio::FLAG_OUTPUT);
|
||||||
this->pin_m1_->digital_write(HIGH);
|
this->pin_m1_->digital_write(true);
|
||||||
delay(20);
|
delay(20);
|
||||||
set_mode_(NORMAL);
|
set_mode_(NORMAL);
|
||||||
ESP_LOGD(TAG, "Setup success");
|
ESP_LOGD(TAG, "Setup success");
|
||||||
|
@ -346,23 +346,23 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
||||||
delay(5);
|
delay(5);
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
this->pin_m0_->digital_write(LOW);
|
this->pin_m0_->digital_write(false);
|
||||||
this->pin_m1_->digital_write(LOW);
|
this->pin_m1_->digital_write(false);
|
||||||
ESP_LOGD(TAG, "MODE NORMAL!");
|
ESP_LOGD(TAG, "MODE NORMAL!");
|
||||||
break;
|
break;
|
||||||
case WOR_SEND:
|
case WOR_SEND:
|
||||||
this->pin_m0_->digital_write(HIGH);
|
this->pin_m0_->digital_write(true);
|
||||||
this->pin_m1_->digital_write(LOW);
|
this->pin_m1_->digital_write(false);
|
||||||
ESP_LOGD(TAG, "MODE WOR SEND!");
|
ESP_LOGD(TAG, "MODE WOR SEND!");
|
||||||
break;
|
break;
|
||||||
case WOR_RECEIVER:
|
case WOR_RECEIVER:
|
||||||
this->pin_m0_->digital_write(LOW);
|
this->pin_m0_->digital_write(false);
|
||||||
this->pin_m1_->digital_write(HIGH);
|
this->pin_m1_->digital_write(true);
|
||||||
ESP_LOGD(TAG, "MODE RECEIVING!");
|
ESP_LOGD(TAG, "MODE RECEIVING!");
|
||||||
break;
|
break;
|
||||||
case CONFIGURATION:
|
case CONFIGURATION:
|
||||||
this->pin_m0_->digital_write(HIGH);
|
this->pin_m0_->digital_write(true);
|
||||||
this->pin_m1_->digital_write(HIGH);
|
this->pin_m1_->digital_write(true);
|
||||||
ESP_LOGD(TAG, "MODE SLEEP and CONFIG!");
|
ESP_LOGD(TAG, "MODE SLEEP and CONFIG!");
|
||||||
break;
|
break;
|
||||||
case MODE_INIT:
|
case MODE_INIT:
|
||||||
|
|
Loading…
Reference in a new issue