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

Method showSysStats

FluidNC/src/WebUI/WebCommands.cpp:116–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114 }
115
116 static Error showSysStats(const char* parameter, AuthenticationLevel auth_level, Channel& out) { // ESP420
117 if (paramIsJSON(parameter)) {
118 return showSysStatsJSON(parameter, auth_level, out);
119 }
120
121 log_stream(out, "Chip ID: " << (uint16_t)(ESP.getEfuseMac() >> 32));
122 log_stream(out, "CPU Cores: " << ESP.getChipCores());
123 log_stream(out, "CPU Frequency: " << ESP.getCpuFreqMHz() << "Mhz");
124
125 std::ostringstream msg;
126 msg << std::fixed << std::setprecision(1) << temperatureRead() << "°C";
127 log_stream(out, "CPU Temperature: " << msg.str());
128 log_stream(out, "Free memory: " << formatBytes(ESP.getFreeHeap()));
129 log_stream(out, "SDK: " << ESP.getSdkVersion());
130 log_stream(out, "Flash Size: " << formatBytes(ESP.getFlashChipSize()));
131
132 for (auto const& module : Modules()) {
133 module->build_info(out);
134 }
135
136 log_stream(out, "FW version: FluidNC " << git_info);
137 return Error::Ok;
138 }
139
140 static Error setWebSetting(const char* parameter, AuthenticationLevel auth_level, Channel& out) { // ESP401
141 // The string is of the form "P=name T=type V=value

Callers

nothing calls this directly

Calls 10

paramIsJSONFunction · 0.85
setprecisionClass · 0.85
temperatureReadFunction · 0.85
formatBytesFunction · 0.85
getEfuseMacMethod · 0.80
getCpuFreqMHzMethod · 0.80
getFreeHeapMethod · 0.80
getSdkVersionMethod · 0.80
getFlashChipSizeMethod · 0.80
build_infoMethod · 0.45

Tested by

no test coverage detected