-
Notifications
You must be signed in to change notification settings - Fork 51
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
Class GSM and other use private variables instead of protected #84
Comments
Hi @johncpang, Adding a getter for it sounds good, would you be able to submit a pull request for this? |
Hi @sandeepmistry, I'd like to do that. When I've got the library works in async, then I'll make a pull request. I'm able to make class As a test or indicator, I blink the onboard LED using a Timer. It stops blinking when |
@sandeepmistry Hi, I've submitted a pull request for this. Please help and merge it. |
I'm looking for a reusable-way to use the library in async. Started with the
GsmWebClient
example, I tried to rewrite the first callGSM::begin(PINNUMBER)
into synchronized function. My attempt is to sub-classGSM
asAsyncGSM
, and sendsynchronous=false
tobegin()
. The overloaded function will take a callback (pointer-to-function) so that whenbegin()
finished (whether success or failed), it will callback the caller.To my understanding, I should rewrite the following code from
GSM::begin()
in my overloaded function, and run the code via mainloop()
.However, I cannot access
_timeout
as it is a private variable instead of protected. I believe, the whole library should consider usingprotected
overprivate
, or provide both getters and setters, so that we can extend the library by sub-classing.The text was updated successfully, but these errors were encountered: