From 85a6425b25b1608fe4697dd112ad4b4da7547a26 Mon Sep 17 00:00:00 2001 From: Pierrick C Date: Sun, 29 Jul 2018 13:07:51 +0200 Subject: [PATCH] Remove obsolete function update_gps() --- circuitpython/main.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/circuitpython/main.py b/circuitpython/main.py index d114ffc..eded109 100644 --- a/circuitpython/main.py +++ b/circuitpython/main.py @@ -104,44 +104,6 @@ def check_data_dir(): elif 'daily' not in os.listdir('data'): os.mkdir('data/daily') -def update_gps(): - """Update and print data from GPS module""" - if not gps.has_fix: - # Try again if we don't have a fix yet. - print('Waiting for fix...{}-{}'.format(gps.has_fix, gps.satellites)) - - else: # GPS fix OK !!! - #UTC Time - print('{}/{}/{} {:02}:{:02}:{:02}'.format( - gps.timestamp_utc.tm_mon, # Grab parts of the time from the - gps.timestamp_utc.tm_mday, # struct_time object that holds - gps.timestamp_utc.tm_year, # the fix time. Note you might - gps.timestamp_utc.tm_hour, # not get all data like year, day, - gps.timestamp_utc.tm_min, # month! - gps.timestamp_utc.tm_sec)) - - if gps.altitude_m is not None: - print('Lat: {}deg | Lon: {}deg | Alt: {}m'.format(gps.latitude, - gps.longitude, - gps.altitude_m)) - else: - print('Lat: {}deg | Lon: {}deg'.format(gps.latitude, - gps.longitude)) - - print('Qual: {}'.format(gps.fix_quality)) - # Some attributes beyond latitude, longitude and timestamp are optional - # and might not be present. Check if they're None before trying to use! - # if gps.satellites is not None: - # print('# sat: {}'.format(gps.satellites)) - # if gps.track_angle_deg is not None: - # print('Speed: {} knots'.format(gps.speed_knots)) - # if gps.track_angle_deg is not None: - # print('Track angle: {} degrees'.format(gps.track_angle_deg)) - # if gps.horizontal_dilution is not None: - # print('Horizontal dilution: {}'.format(gps.horizontal_dilution)) - # if gps.height_geoid is not None: - # print('Height geo ID: {} meters'.format(gps.height_geoid)) - def update_neopixel(data): """Conversion des données en couleur pour affichage sur NeoPixel * ROUGE => temp?rature : max = 35?C, min =10?C soit une amplitude de 25?C