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.

ultralcd.h 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #ifndef ULTRALCD_H
  2. #define ULTRALCD_H
  3. #include "Marlin.h"
  4. #ifdef ULTRA_LCD
  5. void lcd_update();
  6. void lcd_init();
  7. void lcd_setstatus(const char* message);
  8. void lcd_setstatuspgm(const char* message);
  9. void lcd_setalertstatuspgm(const char* message);
  10. void lcd_reset_alert_level();
  11. static unsigned char blink = 0; // Variable for visualisation of fan rotation in GLCD
  12. #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
  13. #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
  14. #define LCD_UPDATE_INTERVAL 100
  15. #define LCD_TIMEOUT_TO_STATUS 15000
  16. #ifdef ULTIPANEL
  17. void lcd_buttons_update();
  18. extern volatile uint8_t buttons; //the last checked buttons in a bit array.
  19. #ifdef REPRAPWORLD_KEYPAD
  20. extern volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shiftregister values
  21. #endif
  22. #else
  23. FORCE_INLINE void lcd_buttons_update() {}
  24. #endif
  25. extern int plaPreheatHotendTemp;
  26. extern int plaPreheatHPBTemp;
  27. extern int plaPreheatFanSpeed;
  28. extern int absPreheatHotendTemp;
  29. extern int absPreheatHPBTemp;
  30. extern int absPreheatFanSpeed;
  31. #ifdef NEWPANEL
  32. #define EN_C (1<<BLEN_C)
  33. #define EN_B (1<<BLEN_B)
  34. #define EN_A (1<<BLEN_A)
  35. #define LCD_CLICKED (buttons&EN_C)
  36. #ifdef REPRAPWORLD_KEYPAD
  37. #define EN_REPRAPWORLD_KEYPAD_F3 (1<<BLEN_REPRAPWORLD_KEYPAD_F3)
  38. #define EN_REPRAPWORLD_KEYPAD_F2 (1<<BLEN_REPRAPWORLD_KEYPAD_F2)
  39. #define EN_REPRAPWORLD_KEYPAD_F1 (1<<BLEN_REPRAPWORLD_KEYPAD_F1)
  40. #define EN_REPRAPWORLD_KEYPAD_UP (1<<BLEN_REPRAPWORLD_KEYPAD_UP)
  41. #define EN_REPRAPWORLD_KEYPAD_RIGHT (1<<BLEN_REPRAPWORLD_KEYPAD_RIGHT)
  42. #define EN_REPRAPWORLD_KEYPAD_MIDDLE (1<<BLEN_REPRAPWORLD_KEYPAD_MIDDLE)
  43. #define EN_REPRAPWORLD_KEYPAD_DOWN (1<<BLEN_REPRAPWORLD_KEYPAD_DOWN)
  44. #define EN_REPRAPWORLD_KEYPAD_LEFT (1<<BLEN_REPRAPWORLD_KEYPAD_LEFT)
  45. #define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1))
  46. #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN)
  47. #define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP)
  48. #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
  49. #endif //REPRAPWORLD_KEYPAD
  50. #else
  51. //atomatic, do not change
  52. #define B_LE (1<<BL_LE)
  53. #define B_UP (1<<BL_UP)
  54. #define B_MI (1<<BL_MI)
  55. #define B_DW (1<<BL_DW)
  56. #define B_RI (1<<BL_RI)
  57. #define B_ST (1<<BL_ST)
  58. #define EN_B (1<<BLEN_B)
  59. #define EN_A (1<<BLEN_A)
  60. #define LCD_CLICKED ((buttons&B_MI)||(buttons&B_ST))
  61. #endif//NEWPANEL
  62. #else //no lcd
  63. FORCE_INLINE void lcd_update() {}
  64. FORCE_INLINE void lcd_init() {}
  65. FORCE_INLINE void lcd_setstatus(const char* message) {}
  66. FORCE_INLINE void lcd_buttons_update() {}
  67. FORCE_INLINE void lcd_reset_alert_level() {}
  68. #define LCD_MESSAGEPGM(x)
  69. #define LCD_ALERTMESSAGEPGM(x)
  70. #endif
  71. char *itostr2(const uint8_t &x);
  72. char *itostr31(const int &xx);
  73. char *itostr3(const int &xx);
  74. char *itostr3left(const int &xx);
  75. char *itostr4(const int &xx);
  76. char *ftostr3(const float &x);
  77. char *ftostr31ns(const float &x); // float to string without sign character
  78. char *ftostr31(const float &x);
  79. char *ftostr32(const float &x);
  80. char *ftostr5(const float &x);
  81. char *ftostr51(const float &x);
  82. char *ftostr52(const float &x);
  83. #endif //ULTRALCD