Adding state to errors, and reset

This commit is contained in:
Rodrigo Alfonso
2023-02-03 05:04:21 -03:00
parent 10fe6020d9
commit d7ffa9792e

View File

@@ -4,11 +4,13 @@
// (0) Include the header
#include "../../_lib/LinkWireless.h"
#define CHECK_ERRORS(MESSAGE) \
if ((lastError = linkWireless->getLastError())) { \
log(std::string(MESSAGE) + " (" + std::to_string(lastError) + ")"); \
hang(); \
return; \
#define CHECK_ERRORS(MESSAGE) \
if ((lastError = linkWireless->getLastError())) { \
log(std::string(MESSAGE) + " (" + std::to_string(lastError) + ") [" + \
std::to_string(linkWireless->getState()) + "]"); \
hang(); \
linkWireless->activate(); \
return; \
}
void activate();