-
Notifications
You must be signed in to change notification settings - Fork 415
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 functions to PhysicalLayer interface #700
Conversation
Everything looks OK, thanks for the contribution. Feel free to open another PR in case you feel the need to add more methods. |
@jgromes, I discovered a bug in my PR today, for the virtual int16_t startReceive(uint32_t timeout = 0, uint16_t irqFlags = 0, uint16_t irqMask = 0); while, for instance, in int16_t startReceive(uint32_t timeout = RADIOLIB_SX126X_RX_TIMEOUT_INF, uint16_t irqFlags = RADIOLIB_SX126X_IRQ_RX_DEFAULT, uint16_t irqMask = RADIOLIB_SX126X_IRQ_RX_DONE); However, calling |
@gasagna I was not able to reproduce this - when I call |
I see what you mean. I put a print statement inside |
I see - I was able to replicate this using a simple wrapper class: class Wrapper {
public:
PhysicalLayer& _phy;
Wrapper(PhysicalLayer& phy) : _phy(phy) { }
int16_t startReceive(uint32_t timeout) {
Serial.print("Wrapper::startReceive, timeout=");
Serial.println(timeout);
_phy.startReceive(timeout);
return(0);
}
};
(...)
Wrapper w(radio);
w.startReceive(10); This indeed produces the following:
It is very similar to how standby is done: add However, there's a bigger issue - the |
Thanks for confirming this. Not sure how to best address it. The question is if you'd like |
I think it would be best if we turn Since this is will take some architectural decisions, I will do it myself and let you know once it's implemented. |
Thanks! |
@gasagna startReceive compatibility across different modules should be fixed now, building a common baseline is going to take a bit more time. |
Hi, following our discussion I have added a few functions to improve the
PhysicalLayer
interface. Surely there are others missing, but these are those i need for now!