Creates a WebUI configuration item specification from a value passed in as a C-style string.
| 249 | // Creates a WebUI configuration item specification from |
| 250 | // a value passed in as a C-style string. |
| 251 | void 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. |