Advertisement
Ariser

menu.h

Sep 20th, 2015
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1.  
  2. #ifndef _INC_MENU
  3. #define _INC_MENU
  4.  
  5. #define MENUDEPTH (1)
  6. #define DEF_MENUSTATE (0)
  7. /*
  8. Menuestates
  9. 0 back, gibts immer
  10. 1 save, nur bei bedarf
  11. 2 cancel, nur bei bedarf
  12. 3 1. eintrag
  13. 4 2. eintrag
  14. ..
  15. 255 spezial?
  16. */
  17.  
  18.  
  19. #include "display.h"
  20.  
  21.  
  22. class Menu
  23. {
  24.     private:
  25.     static uint8_t menustate[MENUDEPTH];    // Menuezustand
  26.     static uint8_t curmen;  // aktueller Menuepunkt
  27.     static bool useraction; // button pressed or rotation
  28.     static bool bupr;   // button pressed
  29.     static int rot;     // button rotated
  30.     static uint8_t curmendepth; // aktuelle Menuetiefe
  31.    
  32.     public:
  33.     static void service();
  34.     static void setup();
  35.     static void setbutt();  // set button to pressed
  36.     static void changerot(int8_t chrot); // increase or decrease buttonposition)
  37.     private:
  38.     static void mWelcome(); // welcome
  39.     static void mMen(); // main menu
  40.     static void dTemp();    // display temperatures
  41. };
  42. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement