Skip to content

Widgets

e2002 edited this page Oct 12, 2022 · 2 revisions

Configuration structures of widgets


/*  Widget  */
/*  exsample:  */
/*  const WidgetConfig iptxtConf PROGMEM = { 4, 60, 1, WA_LEFT };  */
struct WidgetConfig {
  uint16_t left; 
  uint16_t top; 
  uint16_t textsize;
  WidgetAlign align;
};

/*  Scroll Widget  */
/*  exsample:  */
/*  const ScrollConfig title1Conf PROGMEM = {{ 4, 50, 2, WA_LEFT }, 140, true, 160-8, 5000, 4, 30 };  */
struct ScrollConfig {
  WidgetConfig widget;
  uint16_t buffsize;      // char buffer size
  bool uppercase;
  uint16_t width;         // width in pixels
  uint16_t startscrolldelay;
  uint8_t scrolldelta;
  uint16_t scrolltime;
};

/*  Fill Widget  */
/*  exsample:  */
/*  const FillConfig metaBGConf PROGMEM = {{ 0, 0, 0, WA_LEFT }, 320, 38, false };  */
struct FillConfig {
  WidgetConfig widget;
  uint16_t width;
  uint16_t height;
  bool outlined;
};

/*  Progress Widget  */
/*  exsample:  */
/*  const ProgressConfig bootPrgConf PROGMEM = { 90, 14, 4 };  */
struct ProgressConfig {
  uint16_t speed;
  uint16_t width;     // in chars
  uint16_t barwidth;
};

/*  VU Bands Config  */
/*  exsample:  */
/*  const VUBandsConfig bandsConf PROGMEM = { 24, 100, 4, 2, 10, 5 };  */
struct VUBandsConfig {
  uint16_t width;
  uint16_t height;
  uint8_t  space;
  uint8_t  vspace;
  uint8_t  perheight;
  uint8_t  fadespeed;
};

/*  Move Config  */
/*  exsample:  */
/*  move weathet string to new position when player is playing  */
/*  const MoveConfig weatherMove PROGMEM = { 8, 97, 320-16 };  */
struct MoveConfig {
  uint16_t x;
  uint16_t y;
  int16_t width;
};

Widgets description


/* SROLLS  */
const ScrollConfig metaConf       // Station name
const ScrollConfig title1Conf     // Artist
const ScrollConfig title2Conf     // Song Title
const ScrollConfig playlistConf   // Current station in the playlist
const ScrollConfig apTitleConf    // Acces point mode title
const ScrollConfig apSettConf     // Acces point mode settings string
const ScrollConfig weatherConf    // Weather

/* BACKGROUNDS  */
const FillConfig   metaBGConf     // Station name bg
const FillConfig   volbarConf     // Volume bar
const FillConfig  playlBGConf     // Background of the current station in the playlist
const FillConfig  heapbarConf     // Heap bar

/* WIDGETS  */
const WidgetConfig bootstrConf    // Boot string (Trying to APName)
const WidgetConfig bitrateConf    // Bitrate widget
const WidgetConfig voltxtConf     // Value of the volume
const WidgetConfig  iptxtConf     // Current IP address
const WidgetConfig   rssiConf     // RSSI
const WidgetConfig numConf        // Number of station / Value of the volume in adjustment mode
const WidgetConfig apNameConf     // Acces point title
const WidgetConfig apName2Conf    // Acces point value
const WidgetConfig apPassConf     // Password title
const WidgetConfig apPass2Conf    // Password value
const WidgetConfig  clockConf     // Clock widget position
const WidgetConfig vuConf         // VU widget position

const WidgetConfig bootWdtConf    // Boot widget
const ProgressConfig bootPrgConf  // Boot progress

/* BANDS  */
const VUBandsConfig bandsConf     // VU bands config

/* STRINGS  */
const char         numtxtFmt[]    // Number of station / Value of the volume in adjustment mode format
const char           rssiFmt[]    // RSSI format
const char          iptxtFmt[]    // IP format
const char         voltxtFmt[]    // Volume format
const char        bitrateFmt[]    // Bitrate format

/* MOVES  (Move some widgets in PLAY mode)*/
const MoveConfig    clockMove     // Clock widget
const MoveConfig   weatherMove    // Weather widget
const MoveConfig   weatherMoveVU  // Weather widget if VU enabled