1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-30 17:49:56 +02:00

Case-insensitive enums for runtime settings

This commit is contained in:
Mitch Bradley
2021-07-01 22:55:30 -10:00
parent 42a349aa22
commit 39fda6a642

View File

@@ -58,7 +58,7 @@ namespace Configuration {
if (newValue_ == nullptr) {
grbl_sendf(out_->client(), "$%s=%s\r\n", setting_, value ? "true" : "false");
} else {
value = (!strcmp(newValue_, "true"));
value = (!strcasecmp(newValue_, "true"));
}
}
}
@@ -109,7 +109,7 @@ namespace Configuration {
}
} else {
for (; e->name; ++e) {
if (!strcmp(newValue_, e->name)) {
if (!strcasecmp(newValue_, e->name)) {
value = e->value;
return;
}