Skip to content

Commit

Permalink
Incorrect default wind direction value
Browse files Browse the repository at this point in the history
  • Loading branch information
sjefferson99 committed Apr 26, 2024
1 parent 9d48100 commit e5f2613
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions enviro/config_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from phew import logging

DEFAULT_USB_POWER_TEMPERATURE_OFFSET = 4.5

DEFAULT_WIND_DIRECTION_OFFSET = 0

def add_missing_config_settings():
try:
Expand All @@ -17,18 +17,18 @@ def add_missing_config_settings():
except AttributeError:
warn_missing_config_setting("usb_power_temperature_offset")
config.usb_power_temperature_offset = DEFAULT_USB_POWER_TEMPERATURE_OFFSET

try:
config.wind_direction_offset
except AttributeError:
warn_missing_config_setting("wind_direction_offset")
config.wind_direction_offset = DEFAULT_USB_POWER_TEMPERATURE_OFFSET


try:
config.wifi_country
except AttributeError:
warn_missing_config_setting("wifi_country")
config.wifi_country = "GB"

try:
config.wind_direction_offset
except AttributeError:
warn_missing_config_setting("wind_direction_offset")
config.wind_direction_offset = DEFAULT_WIND_DIRECTION_OFFSET

def warn_missing_config_setting(setting):
logging.warn(f"> config setting '{setting}' missing, please add it to config.py")

0 comments on commit e5f2613

Please sign in to comment.