@@ -2674,14 +2674,19 @@ class uniList {
2674
2674
}
2675
2675
void clearList (){
2676
2676
tft.fillRect (m_x, m_y, m_w, m_h, m_bgColor);
2677
+ for (int i = 0 ; i < 10 ; i++){
2678
+ free (m_txt[i]); m_txt[i] = strdup (" " );
2679
+ free (m_ext[i]); m_ext[i] = strdup (" " );
2680
+ m_nr[i] = -1 ;
2681
+ }
2677
2682
}
2678
2683
void drawLine (uint8_t pos, const char * txt, const char * ext, const char * color = ANSI_ESC_WHITE, int16_t nr = -1 ){
2679
2684
if (pos > 9 ) return ;
2680
2685
tft.setFont (m_fontSize);
2681
2686
if (m_mode == RADIO){
2682
2687
sprintf (m_buff, ANSI_ESC_YELLOW " %03d %s%s" , nr, color, txt);
2683
- if (txt){free (m_txt[pos]); m_txt[pos] = NULL ; m_txt[pos] = strdup (txt);}
2684
- if (ext){free (m_ext[pos]); m_ext[pos] = NULL ; m_ext[pos] = strdup (ext);}
2688
+ if (txt){free (m_txt[pos]); m_txt[pos] = strdup (txt);}
2689
+ if (ext){free (m_ext[pos]); m_ext[pos] = strdup (ext);}
2685
2690
m_nr[pos] = nr;
2686
2691
}
2687
2692
tft.writeText (m_buff, m_insert, m_y + pos *m_lineHight, m_w - 10 , m_lineHight, TFT_ALIGN_LEFT, TFT_ALIGN_CENTER, true , true );
@@ -3530,7 +3535,22 @@ class fileList : public RegisterTable {
3530
3535
}
3531
3536
};
3532
3537
// ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
3533
- extern stationManagement staMgnt;
3538
+ extern stationManagement staMgnt; /*
3539
+ ———————————————————————————————————————————————————————
3540
+ | Stations List Vol3 01:16:32 | m_stationListPos
3541
+ | 017 BGRADIOk | <-- 0
3542
+ | 018 knixx.fm | <-- 1
3543
+ | 019 -0N-Chrismas on Radio | <-- 2
3544
+ | 020 BBC 6music | <-- 3
3545
+ | 021 -0N-Movues on Radio | <-- 4
3546
+ | 022 -0N-Top40 on Radio | <-- 5
3547
+ | 023 Rockantenne Alternative (mp3) | <-- 6
3548
+ | 024 Gra Wroclaw | <-- 7
3549
+ | 025 Classic EuroDisco | <-- 8
3550
+ | 026 Hit Radio FFH - Soundtrack (AAC+) | <-- 9
3551
+ | 003 0:00 128K IP:192.168.178.24 |
3552
+ ———————————————————————————————————————————————————————
3553
+ */
3534
3554
class stationsList : public RegisterTable {
3535
3555
private:
3536
3556
int16_t m_x = 0 ;
@@ -3684,7 +3704,7 @@ class stationsList : public RegisterTable {
3684
3704
}
3685
3705
return ;
3686
3706
}
3687
-
3707
+ if (myList. getNumberByPos (m_stationListPos) == - 1 ) return ;
3688
3708
if (m_oldX || m_oldY) return ;
3689
3709
m_oldX = x; m_oldY = y;
3690
3710
m_browseOnRelease = 3 ; // pos has clicked
0 commit comments