My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ultralcd.h 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. #else
  20. FORCE_INLINE void lcd_buttons_update() {}
  21. #endif
  22. extern int plaPreheatHotendTemp;
  23. extern int plaPreheatHPBTemp;
  24. extern int plaPreheatFanSpeed;
  25. extern int absPreheatHotendTemp;
  26. extern int absPreheatHPBTemp;
  27. extern int absPreheatFanSpeed;
  28. #ifdef NEWPANEL
  29. #define EN_C (1<<BLEN_C)
  30. #define EN_B (1<<BLEN_B)
  31. #define EN_A (1<<BLEN_A)
  32. #define LCD_CLICKED (buttons&EN_C)
  33. #else
  34. //atomatic, do not change
  35. #define B_LE (1<<BL_LE)
  36. #define B_UP (1<<BL_UP)
  37. #define B_MI (1<<BL_MI)
  38. #define B_DW (1<<BL_DW)
  39. #define B_RI (1<<BL_RI)
  40. #define B_ST (1<<BL_ST)
  41. #define EN_B (1<<BLEN_B)
  42. #define EN_A (1<<BLEN_A)
  43. #define LCD_CLICKED ((buttons&B_MI)||(buttons&B_ST))
  44. #endif//NEWPANEL
  45. #else //no lcd
  46. FORCE_INLINE void lcd_update() {}
  47. FORCE_INLINE void lcd_init() {}
  48. FORCE_INLINE void lcd_setstatus(const char* message) {}
  49. FORCE_INLINE void lcd_buttons_update() {}
  50. FORCE_INLINE void lcd_reset_alert_level() {}
  51. #define LCD_MESSAGEPGM(x)
  52. #define LCD_ALERTMESSAGEPGM(x)
  53. #endif
  54. char *itostr2(const uint8_t &x);
  55. char *itostr31(const int &xx);
  56. char *itostr3(const int &xx);
  57. char *itostr3left(const int &xx);
  58. char *itostr4(const int &xx);
  59. char *ftostr3(const float &x);
  60. char *ftostr31ns(const float &x); // float to string without sign character
  61. char *ftostr31(const float &x);
  62. char *ftostr32(const float &x);
  63. char *ftostr5(const float &x);
  64. char *ftostr51(const float &x);
  65. char *ftostr52(const float &x);
  66. #endif //ULTRALCD