Secrets Cleanup: P Part 2
- fix typos celcius to celsius
This commit is contained in:
parent
2b5fd71ab0
commit
f9a414ddbc
4 changed files with 7 additions and 7 deletions
|
|
@ -58,7 +58,7 @@ group.append(press_data)
|
|||
|
||||
display.root_group = group
|
||||
|
||||
# function to convert celcius to fahrenheit
|
||||
# function to convert celsius to fahrenheit
|
||||
def c_to_f(temp):
|
||||
temp_f = (temp * 9/5) + 32
|
||||
return temp_f
|
||||
|
|
@ -87,12 +87,12 @@ while True:
|
|||
print(servo_value)
|
||||
# if metric units...
|
||||
if metric_units:
|
||||
# update temp & pressure text in celcius and hPa
|
||||
# update temp & pressure text in celsius and hPa
|
||||
temp_data.text = "%0.1f ºC" % bmp280.temperature
|
||||
press_data.text = "%0.1f hPa" % bmp280.pressure
|
||||
# if imperial units...
|
||||
else:
|
||||
# convert celcius to fahrenheit
|
||||
# convert celsius to fahrenheit
|
||||
temp_fahrenheit = c_to_f(bmp280.temperature)
|
||||
# convert hPa to inHg
|
||||
pressure_inHg = hpa_to_inHg(bmp280.pressure)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ pixels = neopixel.NeoPixel(board.D1, # NeoPixels on pin D1
|
|||
# For the Gemma M0 onboard DotStar LED
|
||||
dotstar = adafruit_dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1)
|
||||
|
||||
def deg_f(deg_c): # Convert Celcius to Fahrenheit
|
||||
def deg_f(deg_c): # Convert celsius to Fahrenheit
|
||||
return(deg_c * 9 / 5) + 32.0
|
||||
|
||||
while True:
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ ow_bus = OneWireBus(board.GP6)
|
|||
# scan for temp sensor
|
||||
ds18 = DS18X20(ow_bus, ow_bus.scan()[0])
|
||||
|
||||
# function to convert celcius to fahrenheit
|
||||
# function to convert celsius to fahrenheit
|
||||
def c_to_f(temp):
|
||||
temp_f = (temp * 9/5) + 32
|
||||
return temp_f
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ mugsy_background = 'mugsy_background.bmp'
|
|||
|
||||
icon_file = None
|
||||
icon_sprite = None
|
||||
celcius = getenv('celcius')
|
||||
celsius = getenv('celsius')
|
||||
|
||||
# display/data refresh timers
|
||||
|
||||
|
|
@ -294,7 +294,7 @@ class Time_State(State):
|
|||
self.weather_icon.append(icon_sprite)
|
||||
|
||||
temperature = weather['main']['temp'] - 273.15 # its...in kelvin
|
||||
if celcius:
|
||||
if celsius:
|
||||
temperature_text = '%3d C' % round(temperature)
|
||||
else:
|
||||
temperature_text = '%3d F' % round(((temperature * 9 / 5) + 32))
|
||||
|
|
|
|||
Loading…
Reference in a new issue