1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-31 10:01:48 +02:00

Fixed Assert for ESP32 environment

This commit is contained in:
Mitch Bradley
2021-06-03 08:23:11 -10:00
parent 620de14b10
commit a999a178e8
2 changed files with 4 additions and 5 deletions

View File

@@ -35,16 +35,15 @@ AssertionFailed AssertionFailed::create(const char* condition, const char* msg,
va_list arg;
va_start(arg, msg);
size_t len = vsnprintf(tmp, 255, msg, arg);
tmp[254] = 0;
msg = tmp;
va_end(arg);
tmp[254] = 0;
st += tmp;
st += " at: ";
st += esp_backtrace_print(10);
return AssertionFailed(st);
return AssertionFailed(st, tmp);
}
#else

View File

@@ -26,7 +26,7 @@ public:
String stackTrace;
String msg;
AssertionFailed(String st) : stackTrace(st) {}
AssertionFailed(String st, String message) : stackTrace(st), msg(message) {}
static AssertionFailed create(const char* condition) { return create(condition, "Assertion failed"); }
static AssertionFailed create(const char* condition, const char* msg, ...);