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:
Terje Io
2023-01-25 21:11:21 +01:00
parent d10804433c
commit fb60b493b5
42 changed files with 2472 additions and 1665 deletions
+18 -1
View File
@@ -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;
}