Update documentation.

This commit is contained in:
Marek Bel 2018-09-19 17:22:06 +02:00
parent b92b307ee8
commit 2607a0c4ed

View File

@ -1,3 +1,5 @@
//! @file
#include "temperature.h" #include "temperature.h"
#include "ultralcd.h" #include "ultralcd.h"
#include "fsensor.h" #include "fsensor.h"
@ -2462,16 +2464,33 @@ static void lcd_LoadFilament()
} }
} }
//! @brief Show filament used a print time
//!
//! If printing current print statistics are shown
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! |Filament used: |
//! | 00.00m |
//! |Print time: |
//! | 00h 00m 00s |
//! ----------------------
//! @endcode
//!
//! If not printing, total statistics are shown
//!
//! @code{.unparsed}
//! |01234567890123456789|
//! |Total filament : |
//! | 000.00 m |
//! |Total print time : |
//! | 00d :00h :00 m |
//! ----------------------
//! @endcode
void lcd_menu_statistics() void lcd_menu_statistics()
{ {
if (IS_SD_PRINTING) if (IS_SD_PRINTING)
{ {
//|01234567890123456789|
//|Filament used: |
//| 000m 00.000cm |
//|Print time: |
//| 00h 00m 00s |
//----------------------
const float _met = ((float)total_filament_used) / (100000.f); const float _met = ((float)total_filament_used) / (100000.f);
const uint32_t _t = (millis() - starttime) / 1000ul; const uint32_t _t = (millis() - starttime) / 1000ul;
const int _h = _t / 3600; const int _h = _t / 3600;
@ -2504,12 +2523,7 @@ void lcd_menu_statistics()
_days = _time / 1440; _days = _time / 1440;
_hours = (_time - (_days * 1440)) / 60; _hours = (_time - (_days * 1440)) / 60;
_minutes = _time - ((_days * 1440) + (_hours * 60)); _minutes = _time - ((_days * 1440) + (_hours * 60));
//|01234567890123456789|
//|Total filament : |
//| 000.00 m |
//|Total print time : |
//| 00d :00h :00 m |
//----------------------
lcd_printf_P(_N( lcd_printf_P(_N(
ESC_2J ESC_2J
"%S :" "%S :"