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:
@@ -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
|
||||
|
@@ -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, ...);
|
||||
|
Reference in New Issue
Block a user