1
0
mirror of https://github.com/bdring/Grbl_Esp32.git synced 2025-08-29 17:19:50 +02:00

$axes/x will display the subtree.

This commit is contained in:
Mitch Bradley
2021-07-16 18:33:43 -10:00
parent 336a7357ef
commit cc2b7baab6
3 changed files with 12 additions and 2 deletions

View File

@@ -25,7 +25,7 @@
#include <atomic>
namespace Configuration {
Generator::Generator(SimpleOutputStream& dst) : indent_(0), dst_(dst) {
Generator::Generator(SimpleOutputStream& dst, int indent) : indent_(indent), dst_(dst) {
std::atomic_thread_fence(std::memory_order::memory_order_seq_cst);
}

View File

@@ -53,7 +53,7 @@ namespace Configuration {
HandlerType handlerType() override { return HandlerType::Generator; }
public:
Generator(SimpleOutputStream& dst);
Generator(SimpleOutputStream& dst, int indent = 0);
void item(const char* name, int& value, int32_t minValue, int32_t maxValue) override {
indent();

View File

@@ -45,6 +45,16 @@ namespace Configuration {
// Handle child:
value->group(*this);
} else {
if (newValue_ == nullptr) {
ClientStream ss(CLIENT_ALL);
ss << setting_ << ":\n";
Configuration::Generator generator(ss, 1);
value->group(generator);
isHandled_ = true;
} else {
log_error("Can't set a value on a section");
}
}
// Restore situation: