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
256 eqlazer 19
#define MAX_DATA_LENGTH 7
193 eqlazer 20
#define LINES           4
21
#define CHARACTERS      20
22
#define EDIT_MODE_SYMBOL "&&"
23
 
24
#define MAIN_VIEW       0
25
#define TEMPSENS_VIEW   1
26
#define RELAYS_VIEW     2
27
#define DIMMERS_VIEW    3
256 eqlazer 28
#define SERVO_VIEW      4
193 eqlazer 29
 
332 eqlazer 30
#define LAST_VIEW SERVO_VIEW /* To keep track on last view */
31
 
193 eqlazer 32
/*---------------------------------------------------------------
33
 * Functions
34
 * ------------------------------------------------------------*/
35
void printLCDview(uint8_t view);
196 eqlazer 36
void printLCDviewData(uint8_t view, uint8_t *data, uint8_t size);
193 eqlazer 37
 
38
/*---------------------------------------------------------------
39
 * Views
40
 * <Line 1> <Line 2> <Line 3> <Left> <Right>
41
 *--------------------------------------------------------------*/
196 eqlazer 42
static char viewStrings[][ MAX_LENGTH ] = {
193 eqlazer 43
    /* Main view */
44
    "HomeAutomation", "", "Welcome", "NA", "Temp",
45
    /* Temperature sensors */
46
    "Temperature Sensors", "1: NA     2: NA", "3: NA     4: NA", "Main", "Relay",
47
    /* Relay status */
256 eqlazer 48
    "Relay Status", "1: NA     2: NA", "3: NA     4: NA", "Temp", "Dimmer",
193 eqlazer 49
    /* Dimmer status */
256 eqlazer 50
    "Dimmer Status", "1: NA     2: NA", "3: NA     4: NA", "Relay", "Servo",
51
    /* Servo (blinds) status */
332 eqlazer 52
    "Servo Status", "1: NA     2: NA", "3: NA     4: NA", "Dimmer", "Mail",
53
    /* Mail status, to interface with a mail account */
54
    "Mail status","New mail: ","","Servo","   NA"
193 eqlazer 55
};
56
 
332 eqlazer 57
static char editStrings[][MAX_LENGTH] = {
58
 
59
};
60
 
196 eqlazer 61
static uint8_t dataPos[][2] = {
62
    {3,1}, /* Data position 1 */
63
    {13,1}, /* Data position 2 */
64
    {3,2}, /* Data position 3 */
65
    {13,2} /* Data position 4 */
66
};
67
 
68