mirror of
https://github.com/esphome/esphome.git
synced 2026-09-22 04:28:43 +00:00
[sx127x] Fix preamble MSB register always written as zero (#14457)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
b2e8544c58
commit
5ba880f19b
@@ -186,7 +186,7 @@ void SX127x::configure_fsk_ook_() {
|
||||
} else {
|
||||
this->write_register_(REG_PREAMBLE_DETECT, PREAMBLE_DETECTOR_OFF);
|
||||
}
|
||||
this->write_register_(REG_PREAMBLE_SIZE_MSB, this->preamble_size_ >> 16);
|
||||
this->write_register_(REG_PREAMBLE_SIZE_MSB, this->preamble_size_ >> 8);
|
||||
this->write_register_(REG_PREAMBLE_SIZE_LSB, this->preamble_size_ & 0xFF);
|
||||
|
||||
// config sync generation and setup ook threshold
|
||||
@@ -214,7 +214,7 @@ void SX127x::configure_lora_() {
|
||||
|
||||
// config preamble
|
||||
if (this->preamble_size_ >= 6) {
|
||||
this->write_register_(REG_PREAMBLE_LEN_MSB, this->preamble_size_ >> 16);
|
||||
this->write_register_(REG_PREAMBLE_LEN_MSB, this->preamble_size_ >> 8);
|
||||
this->write_register_(REG_PREAMBLE_LEN_LSB, this->preamble_size_ & 0xFF);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user