Skip to content

Commit b96cb72

Browse files
authored
Add files via upload
Deceased time to check for metadata updates from ~1min to ~15 seconds. Updated some print statements so it was obvious where/what was printing a message. Commented out some leftover print statements used for debugging/monitoring.
1 parent 3cb113f commit b96cb72

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

PyPod.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def init(bdrate=19200):
2121
def MetaDataUpdate(NewMD):
2222
global MetaData
2323
MetaData = NewMD
24-
print('MetaDataUpdate')
24+
print('PyPod.MetaDataUpdate:')
2525
print(MetaData)
2626
return(MetaData)
2727

RN52.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def GetStatus():
2929
return(resp)
3030

3131
def GetMetaData():
32-
print('RN52.MetaDataUpdate')
32+
print('RN52.GetMetaData')
3333
RN52Uart.timeout = 1
3434
MetaData = {}
3535
command = 'AD\n'

main.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
# Push the metadata to the ipod module.
3737
PyPod.MetaDataUpdate(MetaData)
3838
# print(time.monotonic())
39-
print(MetaData)
4039

4140
# Get Connection Status.
4241
RN52Status = RN52.GetStatus()
@@ -51,7 +50,7 @@
5150

5251
if RN52Status[1] == '0':
5352
MetaData['Title'] = 'Not Connected'
54-
print(MetaData)
53+
# print(MetaData)
5554

5655
'''
5756
Check status of ChangeFlag Input pin.
@@ -99,8 +98,8 @@ def ProcessCmdReq(cmd):
9998
PyPod.TrackChangeNotification()
10099
UpdateTimer = round(time.monotonic() * 1000)
101100

102-
#Force check for MetaData update once every minute.
103-
if time.monotonic() * 1000 - MDTimer > 60000:
101+
#Force check for MetaData update if X time has passed.
102+
if time.monotonic() * 1000 - MDTimer > 15000:
104103
print('Checking Stored MetaData against RN52 MetaData')
105104
NewMD = RN52.GetMetaData()
106105
if NewMD != MetaData:

0 commit comments

Comments
 (0)