Closed GMagician closed 5 years ago
Not sure whether serverClient
can be false when serverClient.available())
is true - but why not try and see what happens.
I think that until you don't assign it with serverClient = telnetServer.available();
it may be null so you call an available
method from a non existent class instance
Please try it out and let me know if it works for you, specifically if it makes any difference/improves anything. Thanks for your contribution.
Actually I don't have any system ready yet. I'm analyzing code at the moment and I found some things I usually "write" in different ways and I'll propose a PR to see if such "way of" coding may be of your interest
I'm also not used to program arduino, it seems like c/c++ but I don't know if exacly the same..for example
parseTemp
function should return nulll, not "" when temp is not found but maybe arduino compiler is different from my c knowledges
And again why don't you use
while (!okFound) {
yield();
instead of
while (okFound == false) {
yield();
other form is compact, but maybe I'm completely in wrong way....
Both should do the same thing. But why change it if it works ;-)
That's true but I'm used to think about shorter things you have to read and easier is to understand :-)
Some people think == false
is more explicit and hence easier to understand, but I am indifferent here
shouldn't this while code be: