def update_weather_for_all_stations(): """ Updates the weather for all of the stations. This does not update the conditions or category. """ weather.get_metars(stations.keys())
def update_weather_for_all_stations(): """ Updates the weather for all of the stations. This does not update the conditions or category. """ weather.get_metars(airport_render_config.keys(), logger=LOGGER)
""" Test all of the LEDs, independent of the configuration to make sure the wiring is correct and that none have failed. """ for color in __get_test_cycle_colors__(): safe_logging.safe_log("Setting to {}".format(color)) __all_leds_to_color__(color) time.sleep(0.5) if __name__ == '__main__': # Start loading the METARs in the background # while going through the self-test safe_logging.safe_log("Initialize weather for all airports") weather.get_metars(stations.keys()) __test_all_leds__() web_server = configuration_server.WeatherMapServer() all_stations(weather.OFF) RecurringTask( "rest_host", 0.1, web_server.run, logger.LOGGER, True) wait_for_all_stations()
if is_global_dimming: colors_to_init.append( __get_dimmed_color__( __get_night_color_to_render__(color_to_cycle, [0.0, 0.0]))) colors_to_init.append(colors[weather.OFF]) return colors_to_init if __name__ == '__main__': # Start loading the METARs in the background # while going through the self-test safe_log(LOGGER, "Initialize weather for all airports") weather.get_metars(airport_render_config.keys(), logger=LOGGER) # Test LEDS on startup for color in __get_test_cycle_colors__(): safe_log(LOGGER, "Setting to {}".format(color)) __all_airports_to_color__(color) time.sleep(0.5) all_airports(weather.OFF) update_categories_task = RecurringTask('UpdateCategorizations', 60, update_all_station_categorizations, LOGGER, True) wait_for_all_airports()