MCPcopy Create free account
hub / github.com/bdring/FluidNC / begin_webui

Method begin_webui

FluidNC/src/JSONEncoder.cpp:251–263  ·  view source on GitHub ↗

Creates a WebUI configuration item specification from a value passed in as a C-style string.

Source from the content-addressed store, hash-verified

249// Creates a WebUI configuration item specification from
250// a value passed in as a C-style string.
251void JSONencoder::begin_webui(const std::string name, const char* type, const char* val) {
252 begin_object();
253 member("F", category);
254 // P is the name that WebUI uses to set a new value.
255 // H is the legend that WebUI displays in the UI.
256 // The distinction used to be important because, prior to the introuction
257 // of named settings, P was a numerical offset into a fixed EEPROM layout.
258 // Now P is a hierarchical name that is as easy to understand as the old H values.
259 member("P", name.c_str());
260 member("H", name.c_str());
261 member("T", type);
262 member("V", val);
263}
264
265// Creates an WebUI configuration item specification from
266// an integer value.

Callers 2

addWebuiMethod · 0.45
itemMethod · 0.45

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected