@@ -12,12 +12,13 @@ bool dsp_before_rssi(DspCore *dsp){
1212 int16_t x1, y1;
1313 char buf[20 ]; /* buffer for the bitrate string */
1414 uint16_t w, h; /* width & height of the bitrate string */
15- int16_t vTop = dsp->height () - TFT_FRAMEWDT * 2 - TFT_LINEHGHT - 2 ; /* vTop - Y cordnate of the bitrate string */
16-
17- sprintf (buf, " %d kBits" , config.station .bitrate );
18- dsp->getTextBounds (buf, 0 , 0 , &x1, &y1, &w, &h);
15+ int16_t vTop = dsp->height () - TFT_FRAMEWDT * 2 - TFT_LINEHGHT - 2 ; /* vTop - Y cordnate of the bitrate string */ ;
16+ sprintf (buf, " RSSI:000dBm" , config.station .bitrate );
1917 dsp->setTextSize (1 );
20- dsp->fillRect (dsp->width () - w - TFT_FRAMEWDT-40 /* left */ , vTop /* top */ , w+40 /* width */ , TFT_LINEHGHT-4 /* height */ , TFT_BG /* background color */ );
18+ dsp->getTextBounds (buf, 0 , 0 , &x1, &y1, &w, &h);
19+ dsp->fillRect (dsp->width () - w - TFT_FRAMEWDT /* left */ , vTop /* top */ , w /* width */ , TFT_LINEHGHT-2 /* height */ , TFT_BG /* background color */ );
20+ sprintf (buf, " %dkBits" , config.station .bitrate );
21+ dsp->getTextBounds (buf, 0 , 0 , &x1, &y1, &w, &h);
2122 if (cnt<2 ){
2223 cnt++;
2324 return true ; /* print RSSI and retrn */
@@ -27,7 +28,6 @@ bool dsp_before_rssi(DspCore *dsp){
2728 dsp->setTextColor (SILVER,TFT_BG);
2829 dsp->setCursor (dsp->width () - w - TFT_FRAMEWDT, vTop);
2930 dsp->print (buf); /* print bitrate */
30-
3131 return false ; /* disable to print RSSI */
3232}
3333
0 commit comments