--- metar-v4.py.dist 2020-09-19 14:11:56.144476814 -0700 +++ metar-v4.py 2020-09-19 23:45:13.336374671 -0700 @@ -1110,7 +1110,7 @@ #grab the airport category, wind speed and various weather from the results given from FAA. for metar in root.iter('METAR'): stationId = metar.find('station_id').text - logger.debug(stationId) #debug + logger.debug(stationId + " is reporting " + metar.find('flight_category').text + " through the API") #debug # Routine to create flight category via cloud cover and/or visability when flight category is not reported. # Routine written and contributed to project by Nick Cirincione. Thank you for your contribution. @@ -1162,7 +1162,7 @@ elif 3.0 <= visibility_statute_mi <= 5.0 and flightcategory != "IFR": #if Flight Category was already set to IFR by clouds, it can't be reduced to MVFR flightcategory = "MVFR" - logger.debug(stationId + " flight category is " + flightcategory) + logger.debug(stationId + " flight category is processed by script as " + flightcategory) else: flightcategory = metar.find('flight_category').text #pull flight category if it exists and save all the algoritm above @@ -1372,16 +1372,21 @@ #debug print out if metar_taf_mos == 0: - logger.debug(("TAF Time +" + str(hour_to_display) + " Hour" + " -->"), end=' ') + pin_color_log="TAF Time +" + str(hour_to_display) + " Hour" + " --> " +# logger.debug(("TAF Time +" + str(hour_to_display) + " Hour" + " -->"), end=' ') elif metar_taf_mos==1: - logger.debug(("METAR -->"), end=' ') +# logger.debug(("METAR -->"), end=' ') + pin_color_log="METAR --> " elif metar_taf_mos == 2: - logger.debug(("MOS Time +" + str(hour_to_display) + " Hour" + " -->"), end=' ') +# logger.debug(("MOS Time +" + str(hour_to_display) + " Hour" + " -->"), end=' ') + pin_color_log="MOS Time +" + str(hour_to_display) + " Hour" + " --> " elif metar_taf_mos == 3: - logger.debug(("Heat Map + "), end=' ') +# logger.debug(("Heat Map + "), end=' ') + pin_color_log="Heat Map + " - logger.debug((airportcode + " " + flightcategory + " " + str(airportwinds) + " " + airportwx + " " + str(cycle_num) + " ")) #debug +# logger.debug((logpreface + airportcode + " " + flightcategory + " wind=" + str(airportwinds) + " wx=" + airportwx + " cycle=" + str(cycle_num) + " ")) #debug + pin_color_log=pin_color_log + airportcode + " " + flightcategory + " wind=" + str(airportwinds) + " wx=" + airportwx + " cycle=" + str(cycle_num) + " " #Check to see if airport code is a NULL and set to black. if airportcode == "NULL" or airportcode == "LGND": @@ -1555,8 +1560,12 @@ xcolor = Color(norm_color[0], norm_color[1], norm_color[2]) strip.setPixelColor(i, xcolor) #set color to display on a specific LED for the current cycle_num cycle. + # Debug log the color settings + pin_color_log = pin_color_log + "/ pin " + str(i) + " color is RGB=" + str(color) + logger.debug(pin_color_log) i = i + 1 #set next LED pin in strip + logger.debug('Sending color commands to LEDs for cycle' + cycle_num) strip.show() #Display strip with newly assigned colors for the current cycle_num cycle. wait_time = cycle_wait[cycle_num] #cycle_wait time is a user defined value time.sleep(wait_time) #pause between cycles. pauses are setup in user definitions.