My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ui_common.h 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. #include "../../inc/MarlinConfigPre.h"
  24. #if ENABLED(NO_LCD_MENUS)
  25. #error "Seriously? High resolution TFT screen without menu?"
  26. #endif
  27. #include "tft.h"
  28. #include "tft_image.h"
  29. #if ENABLED(TOUCH_SCREEN)
  30. #include "touch.h"
  31. extern bool draw_menu_navigation;
  32. #endif
  33. #if HAS_UI_320x240
  34. #include "ui_320x240.h"
  35. #elif HAS_UI_480x320 || HAS_UI_480x272
  36. #include "ui_480x320.h"
  37. #elif HAS_UI_1024x600
  38. #include "ui_1024x600.h"
  39. #else
  40. #error "Unsupported display resolution!"
  41. #endif
  42. void draw_heater_status(uint16_t x, uint16_t y, const int8_t Heater);
  43. void draw_fan_status(uint16_t x, uint16_t y, const bool blink);
  44. void menu_line(const uint8_t row, uint16_t color=COLOR_BACKGROUND);
  45. void menu_item(const uint8_t row, bool sel = false);
  46. #if HAS_TOUCH_SLEEP
  47. bool lcd_sleep_task();
  48. #endif
  49. #define ABSOLUTE_ZERO -273.15
  50. #if HAS_TEMP_CHAMBER && HAS_MULTI_HOTEND
  51. #define ITEM_E0 0
  52. #define ITEM_E1 1
  53. #define ITEM_BED 2
  54. #define ITEM_CHAMBER 3
  55. #define ITEM_FAN 4
  56. #define ITEMS_COUNT 5
  57. #elif HAS_TEMP_CHAMBER
  58. #define ITEM_E0 0
  59. #define ITEM_BED 1
  60. #define ITEM_CHAMBER 2
  61. #define ITEM_FAN 3
  62. #define ITEMS_COUNT 4
  63. #elif HAS_TEMP_COOLER
  64. #define ITEM_COOLER 0
  65. #define ITEM_FAN 1
  66. #define ITEMS_COUNT 2
  67. #elif HAS_MULTI_HOTEND
  68. #define ITEM_E0 0
  69. #define ITEM_E1 1
  70. #define ITEM_BED 2
  71. #define ITEM_FAN 3
  72. #define ITEMS_COUNT 4
  73. #else
  74. #define ITEM_E0 0
  75. #define ITEM_BED 1
  76. #define ITEM_FAN 2
  77. #define ITEMS_COUNT 3
  78. #endif