Remove obsolete function update_gps()

This commit is contained in:
Pierrick C 2018-07-29 13:07:51 +02:00
parent 5f8990e60e
commit 85a6425b25

View File

@ -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