| 
    Prusa MINI Firmware overview
    
   | 
 
 
 
  
  
 
Go to the documentation of this file.
   24 #include "../HAL/shared/Marduino.h" 
   44     this->value = seconds;
 
   55     return (this->value == 
value);
 
   74     return this->
day() / 365;
 
   81   inline uint16_t 
day()
 const {
 
   82     return this->
hour() / 24;
 
   89   inline uint32_t 
hour()
 const {
 
   90     return this->
minute() / 60;
 
   98     return this->
second() / 60;
 
  124     int y = this->
year(),
 
  125         d = this->
day() % 365,
 
  126         h = this->
hour() % 24,
 
  130     if (y) 
sprintf_P(buffer, 
PSTR(
"%iy %id %ih %im %is"), y, d, h, m, s);
 
  131     else if (d) 
sprintf_P(buffer, 
PSTR(
"%id %ih %im %is"), d, h, m, s);
 
  150     uint16_t h = uint16_t(this->
hour()),
 
  151              m = uint16_t(this->
minute() % 60UL);
 
  153       uint16_t d = this->
day();
 
  155       return d >= 10 ? 9 : 8;
 
  
 
char * toString(char *const buffer) const
Formats the duration as a string.
Definition: duration_t.h:123
 
uint32_t hour() const
Formats the duration as hours.
Definition: duration_t.h:89
 
bool operator!=(const uint32_t &value) const
Inequality comparison.
Definition: duration_t.h:65
 
uint8_t year() const
Formats the duration as years.
Definition: duration_t.h:73
 
uint32_t minute() const
Formats the duration as minutes.
Definition: duration_t.h:97
 
#define sprintf_P(s,...)
Definition: pgmspace.h:72
 
bool operator==(const uint32_t &value) const
Equality comparison.
Definition: duration_t.h:54
 
#define PSTR(str)
Definition: pgmspace.h:31
 
uint16_t day() const
Formats the duration as days.
Definition: duration_t.h:81
 
uint32_t value
Duration is stored in seconds.
Definition: duration_t.h:30
 
duration_t()
Constructor.
Definition: duration_t.h:35
 
const uint8_t[]
Definition: 404_html.c:3
 
uint8_t toDigital(char *buffer, bool with_days=false) const
Formats the duration as a string.
Definition: duration_t.h:149
 
duration_t(uint32_t const &seconds)
Constructor.
Definition: duration_t.h:43
 
Definition: duration_t.h:26
 
uint32_t second() const
Formats the duration as seconds.
Definition: duration_t.h:105