The actual value of delayLen may not be as intended:
1) Due to the uint8_t truncation, the max delay will be 255.
If the value of expression exceeds 255 it will wrap around to a very short delay.
2) If the expression resolves to a negative value (when lastRx was long ago) then the actual delay will be 0..255 when it probably should be 0 (I assume).
I don’t know enough to predict whether this causes any undesirable outcome.
Curious: Is it correct that this version of RATGDO (secplus1) “hears itself” and so all TX is ultimately RX-ed?
See ratdgo.cpp:714 (commit 45b9263), at the beginning of the toggleDoor() function.
Found while reading the code in ratgdo.cpp:
The actual value of delayLen may not be as intended: 1) Due to the uint8_t truncation, the max delay will be 255. If the value of expression exceeds 255 it will wrap around to a very short delay. 2) If the expression resolves to a negative value (when lastRx was long ago) then the actual delay will be 0..255 when it probably should be 0 (I assume).
I don’t know enough to predict whether this causes any undesirable outcome. Curious: Is it correct that this version of RATGDO (secplus1) “hears itself” and so all TX is ultimately RX-ed?
See ratdgo.cpp:714 (commit 45b9263), at the beginning of the toggleDoor() function.