Frästisch mit elektronischer Höhenverstellung mittels Schrittmotoren.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

Display.h 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Display.h
  3. *
  4. * Wrapper class for Adafruit OLED display.
  5. *
  6. * Created on: 28.01.2022
  7. * Author: FSmilari
  8. */
  9. #ifndef DISPLAY_H_
  10. #define DISPLAY_H_
  11. #include <Adafruit_SSD1306.h>
  12. #include <stdint.h>
  13. #include "fonts/titillium_web_6pt7b.h"
  14. #include "fonts/titillium_web_8pt7b.h"
  15. #include "fonts/titillium_web_12pt7b.h"
  16. #include "fonts/titillium_web_24pt7b.h"
  17. #include "fonts/titillium_web_30pt7b.h"
  18. #include "fonts/SFToolsLogo.h"
  19. #include <Fonts/FreeSans12pt7b.h>
  20. #include <Fonts/FreeSans9pt7b.h>
  21. #include "Status.h"
  22. #define SCREEN_WIDTH 128
  23. #define SCREEN_HEIGHT 64
  24. #define SCREEN_ADDRESS 0x3C
  25. #define STATUS_TXT_IDLE "OPR"
  26. #define STATUS_TXT_TOOLCHG "WZW"
  27. #define STATUS_TXT_CFG "SETUP"
  28. class Display {
  29. private:
  30. Adafruit_SSD1306 ssd1306;
  31. void calculateWH(String units, uint16_t &w, uint16_t &h);
  32. void drawStatusText(String txt);
  33. void drawConfigText(String txt);
  34. void drawConfigOption(String txt);
  35. public:
  36. Display();
  37. void init(void);
  38. void display(void);
  39. void clearDisplay(void);
  40. void showBrand(void);
  41. void showInitialization(void);
  42. void showFrame(Status status);
  43. };
  44. #endif /* DISPLAY_H_ */