mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-08-29 09:10:03 +02:00
$axes/x will display the subtree.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user