I'm using the library for a temperature sensor of my solar boiler system, it works great, thanks for the good work!
When WiFly::exitCommandMode() does not get 'EXIT\r\n' from the wifly it raises an error (correct) and leaves the variable inCommandMode as it is (= true).
Most probably the wifly did not return 'EXIT\r\n' because it somehow already left command mode.
WiFly::startCommand() first checks 'inCommandmode == true', thinks the wifly is still in commandmode and does not execute a '$$$' command. Because WiFly will not get in command mode, WiFly::exitCommandMode() will never get an 'EXIT\r\n' and doesn't change anything. Even a WiFly::reboot() won't work (because it uses WiFly::startCommand()). The way it is working right now, to me it seems impossible to get out of this situation.
A solution for this might be to assume the wifly is not in command mode when WiFly::exitCommandMode() doesn't get an 'EXIT\r\n'. In that situation still raise an error, but set inCommandMode false anyway.
I'm using the library for a temperature sensor of my solar boiler system, it works great, thanks for the good work!
When WiFly::exitCommandMode() does not get 'EXIT\r\n' from the wifly it raises an error (correct) and leaves the variable inCommandMode as it is (= true).
Most probably the wifly did not return 'EXIT\r\n' because it somehow already left command mode.
WiFly::startCommand() first checks 'inCommandmode == true', thinks the wifly is still in commandmode and does not execute a '$$$' command. Because WiFly will not get in command mode, WiFly::exitCommandMode() will never get an 'EXIT\r\n' and doesn't change anything. Even a WiFly::reboot() won't work (because it uses WiFly::startCommand()). The way it is working right now, to me it seems impossible to get out of this situation.
A solution for this might be to assume the wifly is not in command mode when WiFly::exitCommandMode() doesn't get an 'EXIT\r\n'. In that situation still raise an error, but set inCommandMode false anyway.