mirror of
https://github.com/esphome/esphome.git
synced 2025-01-09 14:21:46 +01:00
trial this
This commit is contained in:
parent
b3b1751e98
commit
54eedc4345
2 changed files with 0 additions and 7 deletions
|
@ -308,12 +308,10 @@ void EbyteLoraComponent::setup() {
|
||||||
}
|
}
|
||||||
void EbyteLoraComponent::request_current_config_() {
|
void EbyteLoraComponent::request_current_config_() {
|
||||||
if (this->can_send_message_("requesting current config")) {
|
if (this->can_send_message_("requesting current config")) {
|
||||||
delay(20);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this->get_mode_() != CONFIGURATION) {
|
if (this->get_mode_() != CONFIGURATION) {
|
||||||
ESP_LOGD(TAG, "Mode not set right");
|
ESP_LOGD(TAG, "Mode not set right");
|
||||||
delay(20);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// program conf command, start at 0 with a size of 8
|
// program conf command, start at 0 with a size of 8
|
||||||
|
@ -347,7 +345,6 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
||||||
ESP_LOGD(TAG, "The M0 and M1 pins is not set, this mean that you are connect directly the pins as you need!");
|
ESP_LOGD(TAG, "The M0 and M1 pins is not set, this mean that you are connect directly the pins as you need!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
delay(40);
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case NORMAL:
|
case NORMAL:
|
||||||
this->pin_m0_->digital_write(false);
|
this->pin_m0_->digital_write(false);
|
||||||
|
@ -373,8 +370,6 @@ void EbyteLoraComponent::set_mode_(ModeType mode) {
|
||||||
ESP_LOGD(TAG, "Don't call this!");
|
ESP_LOGD(TAG, "Don't call this!");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
delay(5);
|
|
||||||
this->current_mode_ = mode;
|
|
||||||
}
|
}
|
||||||
bool EbyteLoraComponent::can_send_message_(const char *info) {
|
bool EbyteLoraComponent::can_send_message_(const char *info) {
|
||||||
// High means no more information is needed
|
// High means no more information is needed
|
||||||
|
|
|
@ -94,8 +94,6 @@ class EbyteLoraComponent : public PollingComponent, public uart::UARTDevice {
|
||||||
void set_network_id(int id) { network_id_ = id; }
|
void set_network_id(int id) { network_id_ = id; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModeType current_mode_ = MODE_INIT;
|
|
||||||
|
|
||||||
// set WOR mode
|
// set WOR mode
|
||||||
void set_mode_(ModeType mode);
|
void set_mode_(ModeType mode);
|
||||||
ModeType get_mode_();
|
ModeType get_mode_();
|
||||||
|
|
Loading…
Reference in a new issue