-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLcdPrintFunctions.hpp
34 lines (24 loc) · 945 Bytes
/
LcdPrintFunctions.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef LCD_PRINT_FUCTIONS_H
#define LCD_PRINT_FUCTIONS_H
#include <LiquidCrystal_I2C.h>
#include <stdint.h>
#include "Clock.hpp"
//Must be initialized somewhere for functions to work
extern LiquidCrystal_I2C lcd;
//In cursor position, of form HH:MM[:SS]
void displayTime(const Time& time, bool enableSecunds=false);
//In cursor position, of form dd:mm:yyyy
void displayDate(const Date& date);
//First row is time HH:MM, second row is date dd.mm.yyyy
void displayDateTime(const Clock& clk);
//Prints date time from global clock, and A12 for active alarms
void printHomePage(const Clock& clk, bool clear=false);
/**
@param val can be negative
@param totalSymbols tells how much symbols to display
**/
void printZeroPaddedInt(int32_t val, int8_t totalSymbols);
void printZeroPaddedIntClearRight(int32_t val, int8_t totalSymbols);
//prints [minus] all significant digits + dot + 2 after dot + C
void printTemperature(float temp);
#endif