Subversion Repositories HomeAutomation

Rev

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

  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. #define DATA1           3,1
  29. #define DATA2           13,1
  30. #define DATA3           3,2
  31. #define DATA4           13,2
  32.  
  33. /*---------------------------------------------------------------
  34.  * Functions
  35.  * ------------------------------------------------------------*/
  36. void printLCDview(uint8_t view);
  37. void printLCDviewData(uint8_t view, uint8_t *data);
  38.  
  39. /*---------------------------------------------------------------
  40.  * Views
  41.  * <Line 1> <Line 2> <Line 3> <Left> <Right>
  42.  *--------------------------------------------------------------*/
  43. char viewStrings[][ MAX_LENGTH ] = {
  44.     /* Main view */
  45.     "HomeAutomation", "", "Welcome", "NA", "Temp",
  46.     /* Temperature sensors */
  47.     "Temperature Sensors", "1: NA     2: NA", "3: NA     4: NA", "Main", "Relay",
  48.     /* Relay status */
  49.     "Relay Status", "1: NA     2: NA", "3: NA    4: NA", "Temp", "Dimmer",
  50.     /* Dimmer status */
  51.     "Dimmer Status", "1: NA     2: NA", "3: NA    4: NA", "Relay", "NA"
  52. };
  53.  
  54.