12
12
#--| User Config |-----------------------------------
13
13
FREQ = 89.00
14
14
PLAYLIST = "test"
15
+ STATION_NAME = "PiPyPirate Radio"
15
16
UPDATE_RATE = 0.5
16
17
#----------------------------------------------------
17
18
56
57
)
57
58
radio .tx_frequency_khz = int (FREQ * 1000 )
58
59
radio .tx_power = 115
60
+ radio .configure_rds (0xADAF , station = STATION_NAME .encode ())
59
61
60
62
# MPD
61
63
mpc = mpd .MPDClient ()
@@ -103,6 +105,8 @@ def update_display():
103
105
draw .text ( (5 , 150 ), artist , font = INFO_FNT , fill = ARTS_CLR )
104
106
draw .text ( (5 , 170 ), album , font = INFO_FNT , fill = ALBM_CLR )
105
107
draw .text ( (5 , 190 ), song , font = INFO_FNT , fill = TITL_CLR )
108
+ rds_info = "{}:{}:{}" .format (artist , album , song )
109
+ radio .rds_buffer = rds_info .encode ()
106
110
107
111
perc = float (status ['elapsed' ]) / float (status ['duration' ])
108
112
draw .rectangle ( (5 , 215 , 235 , 230 ), outline = PROG_CLR )
@@ -115,6 +119,8 @@ def update_display():
115
119
116
120
last_update = time .monotonic ()
117
121
122
+ print ("Now broadcasting {} on {}FM" .format (STATION_NAME , FREQ ))
123
+
118
124
while True :
119
125
now = time .monotonic ()
120
126
try :
0 commit comments