Notifications
Clear all
10/18/2023 Map Stopped Working?
Visit this post for the fix
LiveSectional Help
16
Posts
3
Users
0
Reactions
2,497
Views
12/01/2021 11:00 am
Vance, the routine that goes out for the data is;
while True: #check internet availability and retry if necessary. If house power outage, map may boot quicker than router.
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.connect(("8.8.8.8", 80))
ipadd = s.getsockname()[0] #get IP Address
logger.info('RPI IP Address = ' + ipadd) #log IP address when ever FAA weather update is retreived.
try:
content = urllib.request.urlopen(url).read()
logger.info('Internet Available')
logger.info(url)
break
except:
logger.warning('FAA Data is Not Available')
logger.warning(url)
time.sleep(delay_time)
pass
The delay_time between rechecks is set to 10 seconds. I wonder if it should be set to 30 seconds? What do you think? - Mark
Page 2 / 2
Prev