Fix args to begin() in SX12xx settings examples #688
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The call to
radio.begin()
in the SX126x and SX128x Settings example code were missing arguments. Since all the arguments have default assigned values, the compiler wasn't complaining, but the values were being applied to incorrect parameters based on the comments.For example, previously the comment for the SX126x Settings example said that
radio2
was being configured with output power of 2 dBm and preamble length of 20 symbols. Actually it was being configured with an output power of 20 dBm and preamble was left default (8).I fixed the calls to
begin()
in the SX126x and SX128x Settings examples. The SX127x Settings example was already fine. I did not check the non-Semtech transceiver examples.Open question: For the SX128x Settings Example, the "sync word" was left out and there was no comment stating an expected value. I used the default value of 0x12 (private network) there, but I'm not certain if that matches your intent. The SX126x Settings example uses 0x34 (lorawan public network) and SX127x uses 0x14 (no meaning I'm aware of).
Also, thanks for this awesome library! 💜