gabywap

BOOMBOX_STYLE_displayST7789conf.h

Feb 26th, 2025
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. /*************************************************************************************
  2. ST7789 320x240 displays configuration file.
  3. Copy this file to yoRadio/src/displays/conf/displayST7789conf_custom.h
  4. and modify it
  5. More info on https://github.com/e2002/yoradio/wiki/Widgets#widgets-description
  6. *************************************************************************************/
  7.  
  8. #ifndef displayST7789conf_h
  9. #define displayST7789conf_h
  10.  
  11. #define DSP_WIDTH 320
  12. #define TFT_FRAMEWDT 8
  13. #define MAX_WIDTH DSP_WIDTH-TFT_FRAMEWDT*2
  14. //#define PLMITEMS 11
  15. //#define PLMITEMLENGHT 40
  16. //#define PLMITEMHEIGHT 22
  17.  
  18. #if BITRATE_FULL
  19. #define TITLE_FIX 44
  20. #else
  21. #define TITLE_FIX 0
  22. #endif
  23. #define bootLogoTop 68
  24.  
  25. /* SROLLS */ /* {{ left, top, fontsize, align }, buffsize, uppercase, width, scrolldelay, scrolldelta, scrolltime } */
  26. const ScrollConfig metaConf PROGMEM = {{ TFT_FRAMEWDT, TFT_FRAMEWDT, 3, WA_LEFT }, 140, false, MAX_WIDTH, 5000, 5, 30 };
  27. const ScrollConfig title1Conf PROGMEM = {{ TFT_FRAMEWDT, 48, 2, WA_LEFT }, 140, false, MAX_WIDTH-TITLE_FIX, 5000, 4, 30 };
  28. const ScrollConfig title2Conf PROGMEM = {{ TFT_FRAMEWDT, 72, 2, WA_LEFT }, 140, false, MAX_WIDTH-TITLE_FIX, 5000, 4, 30 };
  29. const ScrollConfig playlistConf PROGMEM = {{ TFT_FRAMEWDT, 112, 2, WA_LEFT }, 140, false, MAX_WIDTH, 1000, 2, 30 };
  30. const ScrollConfig apTitleConf PROGMEM = {{ TFT_FRAMEWDT, TFT_FRAMEWDT, 3, WA_CENTER }, 140, false, MAX_WIDTH, 0, 4, 20 };
  31. const ScrollConfig apSettConf PROGMEM = {{ TFT_FRAMEWDT, 240-TFT_FRAMEWDT-16, 2, WA_LEFT }, 140, false, MAX_WIDTH, 0, 4, 30 };
  32. const ScrollConfig weatherConf PROGMEM = {{ 8, 87, 2, WA_LEFT }, 140, false, MAX_WIDTH, 0, 4, 30 };
  33.  
  34. /* BACKGROUNDS */ /* {{ left, top, fontsize, align }, width, height, outlined } */
  35. const FillConfig metaBGConf PROGMEM = {{ 0, 0, 0, WA_LEFT }, DSP_WIDTH, 38, false };
  36. const FillConfig metaBGConfInv PROGMEM = {{ 0, 38, 0, WA_LEFT }, DSP_WIDTH, 1, false };
  37. const FillConfig volbarConf PROGMEM = {{ TFT_FRAMEWDT, 240-TFT_FRAMEWDT-6, 0, WA_LEFT }, MAX_WIDTH, 6, true };
  38. const FillConfig playlBGConf PROGMEM = {{ 0, 107, 0, WA_LEFT }, DSP_WIDTH, 24, false };
  39. const FillConfig heapbarConf PROGMEM = {{ 0, 239, 0, WA_LEFT }, DSP_WIDTH, 1, false };
  40.  
  41. /* WIDGETS */ /* { left, top, fontsize, align } */
  42. const WidgetConfig bootstrConf PROGMEM = { 0, 182, 1, WA_CENTER };
  43. const WidgetConfig bitrateConf PROGMEM = { TFT_FRAMEWDT, 20, 1, WA_RIGHT };
  44. const WidgetConfig voltxtConf PROGMEM = { 0, 214, 1, WA_CENTER };
  45. const WidgetConfig iptxtConf PROGMEM = { TFT_FRAMEWDT, 214, 1, WA_LEFT };
  46. const WidgetConfig rssiConf PROGMEM = { TFT_FRAMEWDT, 208, 2, WA_RIGHT };
  47. const WidgetConfig numConf PROGMEM = { 0, 120+30, 52, WA_CENTER };
  48. const WidgetConfig apNameConf PROGMEM = { TFT_FRAMEWDT, 66, 2, WA_CENTER };
  49. const WidgetConfig apName2Conf PROGMEM = { TFT_FRAMEWDT, 90, 2, WA_CENTER };
  50. const WidgetConfig apPassConf PROGMEM = { TFT_FRAMEWDT, 130, 2, WA_CENTER };
  51. const WidgetConfig apPass2Conf PROGMEM = { TFT_FRAMEWDT, 154, 2, WA_CENTER };
  52. const WidgetConfig clockConf PROGMEM = { 8, 176, 52, WA_RIGHT }; /* 52 is a fixed font size. do not change */
  53. const WidgetConfig vuConf PROGMEM = { 5, 195, 1, WA_CENTER };//3 188 196 - TFT_FRAMEWDT, 195, 1, WA_CENTER
  54.  
  55. const WidgetConfig bootWdtConf PROGMEM = { 0, 162, 1, WA_CENTER };
  56. const ProgressConfig bootPrgConf PROGMEM = { 90, 14, 4 };
  57. const BitrateConfig fullbitrateConf PROGMEM = {{TFT_FRAMEWDT+5, 125, 2, WA_RIGHT}, 42 };//100 +3
  58.  
  59. /* BANDS */ /* { onebandwidth, onebandheight, bandsHspace, bandsVspace, numofbands, fadespeed } */
  60. const VUBandsConfig bandsConf PROGMEM = { 150, 15, 10, 2, 10, 3 };//{ 150, 15, 10, 2, 10, 3 }; - 150, 15, 15, 2, 9, 3
  61.  
  62. /* STRINGS */
  63. const char numtxtFmt[] PROGMEM = "%d";
  64. const char rssiFmt[] PROGMEM = "WiFi %d";
  65. const char iptxtFmt[] PROGMEM = "\010 %s";
  66. const char voltxtFmt[] PROGMEM = "\023\025%d";
  67. const char bitrateFmt[] PROGMEM = "%d kBs";
  68.  
  69. /* MOVES */ /* { left, top, width } */
  70. const MoveConfig clockMove PROGMEM = { 8, 180, -1 };
  71. const MoveConfig weatherMove PROGMEM = { 8, 97, MAX_WIDTH };
  72. const MoveConfig weatherMoveVU PROGMEM = { 70, 97, 250 };
  73.  
  74. #endif
Advertisement
Add Comment
Please, Sign In to add comment