Limit copy-paste by moving common functionality to PhysicaLayer class
We are starting to accumulate some copy-pasted code, which is prone to mistakes and is hard to maintain. We should think a bit about how to limit this, preferrably by exploiting the existing abstraction in PhysicaLayer.
List of items (non-exhaustive and will be added to):
- [ ]
setDataRatein module classes - repeating check for modem configuration
When working on the calculateTimeOnAir() function, I also wondered about this. Since LoRa packets are compatible between radios, they should also produce the same results given the same settings. Semtech’s calculator also shows this and the methods for SX126x and LR11x0 are already (largely) the same.
The only thing that might actually be different is sub-GHz versus 2.4GHz LoRa, but this can be considered a different "modem".