Move data units and types dict from uart2mqtt module to cameteo_conf

This commit is contained in:
Pierrick C 2018-08-17 23:53:56 +02:00
parent 9174e70030
commit b2e547cf55
2 changed files with 31 additions and 27 deletions

View File

@ -90,4 +90,34 @@ photo_extensions = {'jpeg': 'jpg',
epd_font_file = parser['EPD'].get('epd_font_file' , fallback='/usr/share/fonts/truetype/freefont/FreeMono.ttf')
epd_bold_font_file = parser['EPD'].get('epd_bold_font_file' , fallback='/usr/share/fonts/truetype/freefont/FreeMonoBold.ttf')
epd_italic_font_file = parser['EPD'].get('epd_italic_font_file' , fallback='/usr/share/fonts/truetype/freefont/FreeMonoOblique.ttf')
epd_rotate = min(int(parser['EPD'].get('epd_rotate', fallback=0)), 1)
epd_rotate = min(int(parser['EPD'].get('epd_rotate', fallback=0)), 1)
########
# MISC #
########
# Dictionnary of data types and units
data_type = {'cput' : "AT",
'temp': "AT",
'time': "TIME",
'hum': "RH",
'press': "AP",
'vbat': "VBAT",
'lat': "COOR",
'lon': "COOR",
'alt': "ALTI",
'pasl': "MSPL",
'qual': "MISC",
'age': "MISC"}
data_unit = {'cput' : "degC",
'temp': "degC",
'time': "",
'hum': "%",
'press': "hPa",
'vbat': "V",
'lat': "deg",
'lon': "deg",
'alt': "m",
'pasl': "hPa",
'qual': "",
'age': "s"}

View File

@ -19,32 +19,6 @@ Transmit data from UART (GPIO) to MQTT broker
"""
__version__ = "0.2"
# Dictionnary of data types and units
data_type = {'cput' : "AT",
'temp': "AT",
'time': "TIME",
'hum': "RH",
'press': "AP",
'vbat': "VBAT",
'lat': "COOR",
'lon': "COOR",
'alt': "ALTI",
'pasl': "MSPL",
'qual': "MISC",
'age': "MISC"}
data_unit = {'cput' : "degC",
'temp': "degC",
'time': "",
'hum': "%",
'press': "hPa",
'vbat': "V",
'lat': "deg",
'lon': "deg",
'alt': "m",
'pasl': "hPa",
'qual': "",
'age': "s"}
###########
# Imports #
###########