/* Fills the buffer with used material in meters Example: 1.5/3.4/-/-/- m  */
static void print_used_material_m(std::span< char > buffer, GCodeInfo &gcode)
/* Fills the buffer with used material in meters Example: 1.5/3.4/-/-/- m  */
static void print_used_material_m(std::span< char > buffer, GCodeInfo &gcode)
{
        const auto &extruder_info = gcode.get_extruder_info(extruder);
        if (extruder_info.used() && extruder_info.filament_used_mm.has_value()) {
            return snprintf(item_buffer.data(), item_buffer.size(), "%0.1f", static_cast<double>(extruder_info.filament_used_mm.value() / 1000.0f));
        } else {
            return snprintf(item_buffer.data(), item_buffer.size(), "-");
        }
    });
    snprintf(buffer.data(), buffer.size(), " m");
}