mirror of
https://github.com/esphome/esphome.git
synced 2025-01-13 16:13:17 +01:00
Update ebyte_lora.cpp
This commit is contained in:
parent
2f6bf26266
commit
fcdcb7d71f
1 changed files with 16 additions and 15 deletions
|
@ -28,6 +28,7 @@ void EbyteLoraComponent::get_current_config_() {
|
|||
set_mode_(CONFIGURATION);
|
||||
uint8_t data[3] = {PROGRAM_CONF, 0x00, 0x08};
|
||||
this->write_array(data, sizeof(data));
|
||||
ESP_LOGD(TAG, "Config info requested");
|
||||
}
|
||||
ModeType EbyteLoraComponent::get_mode_() {
|
||||
ModeType internalMode = MODE_INIT;
|
||||
|
@ -201,21 +202,21 @@ void EbyteLoraComponent::loop() {
|
|||
}
|
||||
if (data[0] == PROGRAM_CONF) {
|
||||
ESP_LOGD(TAG, "GOT PROGRAM_CONF");
|
||||
memcpy(&this->config, &data, data.size());
|
||||
ESP_LOGD(TAG, this->config.addh_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.addl_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_0.air_data_rate_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_0.uart_baud_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_0.parity_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_1.rssi_noise_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_1.sub_packet_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_1.transmission_power_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.channel_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_3.enable_lbt_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_3.wor_period_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_3.enable_rssi_description_().c_str());
|
||||
ESP_LOGD(TAG, this->config.reg_3.transmission_type_description_().c_str());
|
||||
set_mode_(NORMAL);
|
||||
// memcpy(&this->config, &data, data.size());
|
||||
// ESP_LOGD(TAG, this->config.addh_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.addl_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_0.air_data_rate_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_0.uart_baud_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_0.parity_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_1.rssi_noise_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_1.sub_packet_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_1.transmission_power_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.channel_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_3.enable_lbt_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_3.wor_period_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_3.enable_rssi_description_().c_str());
|
||||
// ESP_LOGD(TAG, this->config.reg_3.transmission_type_description_().c_str());
|
||||
// set_mode_(NORMAL);
|
||||
}
|
||||
}
|
||||
void EbyteLoraComponent::send_switch_info_() {
|
||||
|
|
Loading…
Reference in a new issue