My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

ultralcd.h 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  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. #ifdef DOGLCD
  12. extern int lcd_contrast;
  13. void lcd_setcontrast(uint8_t value);
  14. #endif
  15. static unsigned char blink = 0; // Variable for visualization of fan rotation in GLCD
  16. #define LCD_MESSAGEPGM(x) lcd_setstatuspgm(PSTR(x))
  17. #define LCD_ALERTMESSAGEPGM(x) lcd_setalertstatuspgm(PSTR(x))
  18. #define LCD_UPDATE_INTERVAL 100
  19. #define LCD_TIMEOUT_TO_STATUS 15000
  20. #ifdef ULTIPANEL
  21. void lcd_buttons_update();
  22. extern volatile uint8_t buttons; //the last checked buttons in a bit array.
  23. #ifdef REPRAPWORLD_KEYPAD
  24. extern volatile uint8_t buttons_reprapworld_keypad; // to store the keypad shift register values
  25. #endif
  26. #else
  27. FORCE_INLINE void lcd_buttons_update() {}
  28. #endif
  29. extern int plaPreheatHotendTemp;
  30. extern int plaPreheatHPBTemp;
  31. extern int plaPreheatFanSpeed;
  32. extern int absPreheatHotendTemp;
  33. extern int absPreheatHPBTemp;
  34. extern int absPreheatFanSpeed;
  35. extern bool cancel_heatup;
  36. void lcd_buzz(long duration,uint16_t freq);
  37. bool lcd_clicked();
  38. void lcd_ignore_click(bool b=true);
  39. #ifdef NEWPANEL
  40. #define EN_C (1<<BLEN_C)
  41. #define EN_B (1<<BLEN_B)
  42. #define EN_A (1<<BLEN_A)
  43. #define LCD_CLICKED (buttons&EN_C)
  44. #ifdef REPRAPWORLD_KEYPAD
  45. #define EN_REPRAPWORLD_KEYPAD_F3 (1<<BLEN_REPRAPWORLD_KEYPAD_F3)
  46. #define EN_REPRAPWORLD_KEYPAD_F2 (1<<BLEN_REPRAPWORLD_KEYPAD_F2)
  47. #define EN_REPRAPWORLD_KEYPAD_F1 (1<<BLEN_REPRAPWORLD_KEYPAD_F1)
  48. #define EN_REPRAPWORLD_KEYPAD_UP (1<<BLEN_REPRAPWORLD_KEYPAD_UP)
  49. #define EN_REPRAPWORLD_KEYPAD_RIGHT (1<<BLEN_REPRAPWORLD_KEYPAD_RIGHT)
  50. #define EN_REPRAPWORLD_KEYPAD_MIDDLE (1<<BLEN_REPRAPWORLD_KEYPAD_MIDDLE)
  51. #define EN_REPRAPWORLD_KEYPAD_DOWN (1<<BLEN_REPRAPWORLD_KEYPAD_DOWN)
  52. #define EN_REPRAPWORLD_KEYPAD_LEFT (1<<BLEN_REPRAPWORLD_KEYPAD_LEFT)
  53. #define LCD_CLICKED ((buttons&EN_C) || (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F1))
  54. #define REPRAPWORLD_KEYPAD_MOVE_Z_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F2)
  55. #define REPRAPWORLD_KEYPAD_MOVE_Z_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_F3)
  56. #define REPRAPWORLD_KEYPAD_MOVE_X_LEFT (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_LEFT)
  57. #define REPRAPWORLD_KEYPAD_MOVE_X_RIGHT (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_RIGHT)
  58. #define REPRAPWORLD_KEYPAD_MOVE_Y_DOWN (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_DOWN)
  59. #define REPRAPWORLD_KEYPAD_MOVE_Y_UP (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_UP)
  60. #define REPRAPWORLD_KEYPAD_MOVE_HOME (buttons_reprapworld_keypad&EN_REPRAPWORLD_KEYPAD_MIDDLE)
  61. #endif //REPRAPWORLD_KEYPAD
  62. #else
  63. //atomic, do not change
  64. #define B_LE (1<<BL_LE)
  65. #define B_UP (1<<BL_UP)
  66. #define B_MI (1<<BL_MI)
  67. #define B_DW (1<<BL_DW)
  68. #define B_RI (1<<BL_RI)
  69. #define B_ST (1<<BL_ST)
  70. #define EN_B (1<<BLEN_B)
  71. #define EN_A (1<<BLEN_A)
  72. #define LCD_CLICKED ((buttons&B_MI)||(buttons&B_ST))
  73. #endif//NEWPANEL
  74. #else //no LCD
  75. FORCE_INLINE void lcd_update() {}
  76. FORCE_INLINE void lcd_init() {}
  77. FORCE_INLINE void lcd_setstatus(const char* message) {}
  78. FORCE_INLINE void lcd_buttons_update() {}
  79. FORCE_INLINE void lcd_reset_alert_level() {}
  80. FORCE_INLINE void lcd_buzz(long duration,uint16_t freq) {}
  81. #define LCD_MESSAGEPGM(x)
  82. #define LCD_ALERTMESSAGEPGM(x)
  83. #endif
  84. char *itostr2(const uint8_t &x);
  85. char *itostr31(const int &xx);
  86. char *itostr3(const int &xx);
  87. char *itostr3left(const int &xx);
  88. char *itostr4(const int &xx);
  89. char *ftostr3(const float &x);
  90. char *ftostr31ns(const float &x); // float to string without sign character
  91. char *ftostr31(const float &x);
  92. char *ftostr32(const float &x);
  93. char *ftostr5(const float &x);
  94. char *ftostr51(const float &x);
  95. char *ftostr52(const float &x);
  96. #endif //ULTRALCD