Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setRxSingleTimeout(...) #576

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marius-ne
Copy link

Dear LoRa Contributors,

first, thanks for your wonderful work! I implemented your library myself and was very happy with it, except that you couldn't change the timeout for the Rx Single Mode. So I went ahead and added that.

I hope you are happy with my contribution.

Best regards
Marius

@marius-ne marius-ne changed the title add setRxSingleTimeout(...) Add setRxSingleTimeout(...) May 11, 2022
@marius-ne
Copy link
Author

Setting a timeout of 1023 symbols with a symbol duration of 1.024 ms (2^SF / BW) would result in a maximum timeout of approximately 1 second (precisely 1.048 s). After that the Timeout Interrupt would be triggered.

@Kongduino
Copy link

Just one nitpick. REG_MODEM_CONFIG_2 contains only two bits of the timeout, ie bits 9 and 1 in position 1 and 0. You should probably do something like this to be on the safe side:

writeRegister(REG_MODEM_CONFIG_2, readRegister(REG_MODEM_CONFIG_2) | ((symbols >> 8)&0x03));

@marius-ne
Copy link
Author

I think that's cared for by the input check, the maximum value is 10 bits long, so the other values in REG_MODEM_CONFIG_2 will not be affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants