diff --git a/components/nrf905/nRF905.h b/components/nrf905/nRF905.h index d1c0986..4dbfe2a 100644 --- a/components/nrf905/nRF905.h +++ b/components/nrf905/nRF905.h @@ -94,8 +94,7 @@ class nRF905 : public Component, void setup() override; - // float get_setup_priority() const override { return setup_priority::HARDWARE; } - float get_setup_priority() const override { return setup_priority::AFTER_CONNECTION; } + float get_setup_priority() const override { return setup_priority::HARDWARE; } void dump_config() override; void loop() override; diff --git a/components/zehnder/zehnder.cpp b/components/zehnder/zehnder.cpp index b8a63e0..2109de4 100644 --- a/components/zehnder/zehnder.cpp +++ b/components/zehnder/zehnder.cpp @@ -97,38 +97,6 @@ void ZehnderRF::setup() { ESP_LOGD(TAG, "Config load ok"); } - // Set nRF905 config - nrf905::Config rfConfig; - rfConfig = this->rf_->getConfig(); - - rfConfig.band = true; - rfConfig.channel = 118; - - // // CRC 16 - rfConfig.crc_enable = true; - rfConfig.crc_bits = 16; - - // // TX power 10 - rfConfig.tx_power = 10; - - // // RX power normal - rfConfig.rx_power = nrf905::PowerNormal; - - rfConfig.rx_address = 0x89816EA9; // ZEHNDER_NETWORK_LINK_ID; - rfConfig.rx_address_width = 4; - rfConfig.rx_payload_width = 16; - - rfConfig.tx_address_width = 4; - rfConfig.tx_payload_width = 16; - - rfConfig.xtal_frequency = 16000000; // defaults for now - rfConfig.clkOutFrequency = nrf905::ClkOut500000; - rfConfig.clkOutEnable = false; - - // Write config back - this->rf_->updateConfig(&rfConfig); - this->rf_->writeTxAddress(0x89816EA9); - this->speed_count_ = 4; this->rf_->setOnTxReady([this](void) {