Notifications
Clear all
List of exported metrics gets reset
I've set up metrics collector to monitor the printer and enabled a whole bunch of metrics in the printer settings.
But it seems that the enabled metrics get reset to default whenever the printer is shut down and powered up again. Is it supposed to behave that way? How do I make it persistent?
Posted : 11/06/2025 8:01 pm
Topic starter
answered:
RE: List of exported metrics gets reset
Ok, judging by https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/HEAD/src/marlin_stubs/M330.cpp#L30-L46 , it's working as implemented: metrics are toggled on/off only in RAM, not persisted anywhere, and upon boot the state is what's statically compiled into the firmware binary.
void PrusaGcodeSuite::M331() { if (!config_store().enable_metrics.get()) { SERIAL_ERROR_MSG("Warning: Metrics are not enabled"); } for (auto metric = metric_get_iterator_begin(), e = metric_get_iterator_end(); metric != e; metric++) { if (strcmp(metric->name, parser.string_arg) == 0) { metric->enabled = true; SERIAL_ECHO_START(); SERIAL_ECHOLNPAIR_F("Metric enabled: ", parser.string_arg); return; } } SERIAL_ERROR_START(); SERIAL_ECHOLNPAIR("Metric not found: ", parser.string_arg); }
I guess short of building and flashing my own firmware my best option is to add a bunch of M331 commands to the start G-code, which would be, uh, suboptimal.
Posted : 14/06/2025 1:28 pm
1 people liked