mirror of
https://github.com/grblHAL/core.git
synced 2026-09-23 12:13:53 +08:00
Added settings, updated settings version to 22. See changelog for details.
Merged defaults.h with config.h, deleted defaults.h and harmonized settings defines.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
Part of grblHAL
|
||||
|
||||
Copyright (c) 2017-2021 Terje Io
|
||||
Copyright (c) 2017-2023 Terje Io
|
||||
Copyright (c) 2011-2016 Sungeun K. Jeon for Gnea Research LLC
|
||||
Copyright (c) 2009-2011 Simen Svale Skogsrud
|
||||
|
||||
@@ -112,3 +112,20 @@ error_details_t *errors_get_details (void)
|
||||
{
|
||||
return &details;
|
||||
}
|
||||
|
||||
const char *errors_get_description (status_code_t id)
|
||||
{
|
||||
uint_fast16_t n_errors;
|
||||
const char *description = NULL;
|
||||
error_details_t *details = grbl.on_get_errors();
|
||||
|
||||
do {
|
||||
n_errors = details->n_errors;
|
||||
do {
|
||||
if(details->errors[--n_errors].id == id)
|
||||
description = details->errors[n_errors].description;
|
||||
} while(description == NULL && n_errors);
|
||||
} while(description == NULL && (details = details->next));
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user