Subversion Repositories HomeAutomation

Rev

Details | Last modification | View Log | SVN | RSS feed

Rev Author Line No. Line
193 eqlazer 1
/*
2
 * Header file for printing predefined pages to 20x4 character LCD.
3
 *
4
 * Author: Erik Larsson
5
 * Date: 2006-12-29
6
 *
7
 */
8
 
9
/*---------------------------------------------------------------
10
 * Includes
11
 * ------------------------------------------------------------*/
12
#include <stdlib.h>
13
#include <inttypes.h>
14
 
15
/*--------------------------------------------------------------
16
 * Defines
17
 * -----------------------------------------------------------*/
18
#define MAX_LENGTH      21
19
#define LINES           4
20
#define CHARACTERS      20
21
#define EDIT_MODE_SYMBOL "&&"
22
 
23
#define MAIN_VIEW       0
24
#define TEMPSENS_VIEW   1
25
#define RELAYS_VIEW     2
26
#define DIMMERS_VIEW    3
27
 
28
/*---------------------------------------------------------------
29
 * Functions
30
 * ------------------------------------------------------------*/
31
void printLCDview(uint8_t view);
196 eqlazer 32
void printLCDviewData(uint8_t view, uint8_t *data, uint8_t size);
193 eqlazer 33
 
34
/*---------------------------------------------------------------
35
 * Views
36
 * <Line 1> <Line 2> <Line 3> <Left> <Right>
37
 *--------------------------------------------------------------*/
196 eqlazer 38
static char viewStrings[][ MAX_LENGTH ] = {
193 eqlazer 39
    /* Main view */
40
    "HomeAutomation", "", "Welcome", "NA", "Temp",
41
    /* Temperature sensors */
42
    "Temperature Sensors", "1: NA     2: NA", "3: NA     4: NA", "Main", "Relay",
43
    /* Relay status */
44
    "Relay Status", "1: NA     2: NA", "3: NA    4: NA", "Temp", "Dimmer",
45
    /* Dimmer status */
46
    "Dimmer Status", "1: NA     2: NA", "3: NA    4: NA", "Relay", "NA"
47
};
48
 
196 eqlazer 49
static uint8_t dataPos[][2] = {
50
    {3,1}, /* Data position 1 */
51
    {13,1}, /* Data position 2 */
52
    {3,2}, /* Data position 3 */
53
    {13,2} /* Data position 4 */
54
};
55
 
56